"Design is a plan for arranging elements in such a way as best to accomplish a particular purpose" — Charles Eames

AVPickerDimView is a simple class combination of UIView, UIActionSheet, and UIPickerView.

Installation
There are 3 ways to download and import the files to your project:

Download:

Using git subtree (recommended)

git subtree add –prefix=AVPickerDimView –squash git@github.com:anjerodesu/AVPickerDimView.git master

Using git submodule

git submodule add git@github.com:anjerodesu/AVPickerDimView.git AVPickerDimView

Download as zip

Download the file: AVPickerDimView Project Page on GitHub
Unzip the folder and put it inside your project with the .xcodeproj file

After downloading and importing the files to your project folder, your next step is …

LockGen is an iOS app that generates random string that can be used to lock specific vaults, accounts, and other classified documents. It can also save the generated string to it’s own secured internal library using Apple’s Core Data technology.

Tricks
Some NSLog tricks I’m using on my escapade. These snippets are preprocessor macros that will help your debugging moments easier if not a lot.

ALog
This snippet will log everything every time you use it in a line. It will display the method name, the line number and the argument you gave.

#define ALog(fmt, …) NSLog((@”%s [Line %d] ” fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);

DLog
This snippet will log everything every time you are in a DEBUG mode but has the same function of ALog.

#ifdef DEBUG
#define DLog(fmt, …) NSLog((@”%s [Line %d] ” fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define DLog(…)
#endif

LFLog

#ifdef DEBUG
#define LFLog() NSLog((@”%s [Line %d]“), __PRETTY_FUNCTION__, __LINE__);
#else
#define LFLog(…)
#endif

This snippet will not take any arguments but will display the current file and method and the line number if you are in a DEBUG mode.

UALog
This snippet is much like DLog. It will take an argument and will display it, but in this case, it will display it using a UIAlertView instead of displaying it on the console.

#ifdef DEBUG
#define UALog(fmt, …) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle: [NSString stringWithFormat: @"%s\n[Line %d]“, __PRETTY_FUNCTION__, __LINE__] message: [NSString stringWithFormat: fmt, ##__VA_ARGS__] delegate: nil cancelButtonTitle: @”Ok” otherButtonTitles: nil]; [alert show]; }
#else
#define UALog(…)
#endif

The debugging process is tough, especially if …

Foursquare (foursquare) in their own words is a location-based mobile platform that makes cities easier to use and more interesting to explore. By “checking in” via a smartphone app or SMS, users share their location with friends while collecting points and virtual badges. Foursquare guides real-world experiences by allowing users to bookmark information about venues that they want to visit and surfacing relevant suggestions about nearby venues.

Important: Before continuing, make sure you have a valid Client ID and Secret to use for your app. For more information, go here: https://developer.foursquare.com/

We can display venues using the foursquare Venues Project. The foursquare Venues Project is an API that makes it easy to display the foursquare venues in various ways.

Using the API we can display venues’ informations from the foursquare venues database in JSON format. In this tutorial, we will use the information from the database to display the data in a map using the built-in MapKit of iOS and a JSON parser to parse the returned information. Yes, we can do that because the information from their database includes latitude and longitude.

Note: The JSON parser I used in this project is SBJSON, you can download it here: …

Table Views are the most common object used to display lists of data to the user. This objects are highly configurable, they can be made to look different things. Mail, Contacts, and Messages to name a few apps using the Table View. Mail uses table view to display lists of accounts, folders, and messages, but table views are not limited to display text, they are also used in YouTube, Settings, and other applications, even though this applications has many different appearances.

Property list files use the filename extension .plist, and thus are often referred to as plist files. Property lists organize data into named values and lists of values using several object types. These types give you the means to produce data that is meaningfully structured, transportable, storable, and accessible, but still as efficient as possible. Property lists are frequently used by applications running on both Mac OS X and iOS. The property-list programming interfaces for Cocoa and Core Foundation allow you to convert hierarchically structured combinations of these basic types of objects to and from standard XML. You can save the XML data to disk and later use it to reconstruct the original objects.

Note: To know more about property list, …

UIColor+ColorWithHex is a category method for iOS UIColor, inspired by the lack of hexadecimal colour integration of iOS.

UIColor+ColorWithHex Download Link

GitHub

Sample Usage:

[[self view] setBackgroundColor: [UIColor colorWithHex: 0xff0000]];

UIColor *randomColor = [UIColor randomColor];

Methods:

+ (UIColor *)colorWithHex:(UInt32)hexadecimal;
+ (UIColor *)colorWithHexString:(NSString *)hexadecimal;
+ (UIColor *)colorWithAlphaHex:(UInt32)hexadecimal;
+ (UIColor *)colorWithAlphaHexString:(NSString *)hexadecimal;
+ (NSString *)hexStringFromColor: (UIColor *)color;
+ (UIColor *)randomColor;
// ObjC (manual hex conversion to RGB)
+ (UIColor *)colorWithHexa:(NSString *)hexadecimal;

This little snippet will let you show the network activity indicator using ShowActivityIndicator(); and hide it with HideActivityIndicator();.

#define ShowActivityIndicator() [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible: YES];
#define HideActivityIndicator() [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible: NO];

If you work with network in your app, then this little code will be an invaluable asset. This will save you a lot of retyping. Just put this in a header file that will be imported in all your files, Constants.h for example.

iOS applications use Cocoa classes, and these classes use the Objective-C programming language so one must know Objective-C if he/she does wish to develop iOS apps. We all know shifting from a loss, non-strict programming language might find iOS’s syntax seem strange and difficult. Don’t worry, this strangeness and difficulties will give way to an elegant experience programming in iOS and I am sure that everyone will appreciate the meticulous language to become an MVC methodologist.

Class @interface and @implementation
iOS separates a class into an @interface and @implementation. An interface declares instance variables, properties and methods. It is a standard C header file and doesn’t provide any method definitions. The implementation, however, contains the method definitions for the class and this is the place where you synthesize the properties. It is the file in a .m extension.

Creating a project with Objective-C Class file
We will create an example project using an Objective-C class and IBAction. First, create a View-Based Application project and name it ClassAndIBAction. After creating the project, single-click the ClassAndIBAction folder and create a new Objective-C Class file. Go to File > New > New File or create the file by pressing Command + N (⌘ + N) buttons …

iOS is one of the most known programming language today in the mobile industry. The first iPhone was release date back June 2007 and has 350,000+ apps as of January 2011. Certainly, it is the most interesting mobile platform to date, and in the release of iOS SDK 4, things just got better.

Things you need
Before continuing, make sure to note all of this requirements. For starters, you’ll need an Intel-based Mac running Snow Leopard (OS X 10.6.7) and an Xcode 3.2.5 or preferably Xcode 4 (I am using Xcode 4).

To download the SDK, you’ll need to register first in the iOS Developer Program. Apple requires signing up before you’re allowed to download the iOS SDK.

To sign up, go to http://developer.apple.com/devcenter/ios/index.action

As you can see on the picture, download of Xcode is limited to version 4. There are two (2) ways to obtain the IDE, one way is to register as an iOS developer and pay $99/year for the standard program, and $299/year for the enterprise program.

Note: The …

On my last post, you learned and became familiar with the template codes of Core Data. Now, you will learn how to model your own data using Core Data and you will modify the code to create to-dos instead of timeStamps. To build the to-do application, you will need to modify the data model by deleting the Event entity and adding a new one called ToDo.

The very first thing you need to do is modify the data model by deleting the Event entity, single-click on the Event entity and press delete on your keyboard. Once deleted, click the Add Entity button inside new entity mapping management area, a new entity will appear, name it ToDo. After you created the entity, try running the app and you will get an error that looks something like this:

2011-03-22 13:37:55.848 CoreDataModeling[6642:207] Unresolved error Error Domain=NSCocoaErrorDomain Code=134100 “The operation couldn’t be completed. (Cocoa error 134100.)” UserInfo=0x4d37da0 {metadata={type = immutable dict, count = 6,
entries =>
0 : {contents = “NSStoreModelVersionIdentifiers”} = {type = immutable, count = 0, values = ()}
2 : {contents = “NSStoreModelVersionHashesVersion”} = {value = +3, type = kCFNumberSInt32Type}
3 : {contents = “NSStoreType”} …

Pages

Copyright © 2010 - 2013 Studio Villegas. All Rights Reserved.