摘要:When you want to use a controller you use the UIStoryboard method instantiateViewControllerWithIdentifier:, using the identifier that you give to the controller in IB,but this method will create a new instance of the UIViewController.You can also use the performSegueWithIdentifier:sender: method (wh
阅读全文
09 2013 档案
摘要:Creating the Xcode ProjectWith a basic idea about what we’ll build, let’s move on. You can create the Xcode project from scratch and design the user interface similar to below:Storyboard of the Demo AppHowever, to save your time from setting up the project, you candownload the Xcode project template
阅读全文
摘要:In this tutorial, we will build a simple app to display a collection of recipe photos in grid layout. Here are what you’re going to learn:Introduction to UICollectionViewHow to Use UICollectionView to build a simple Grid-based layoutCustomizing the Collection Cell BackgroundCreate Simple App with Gr
阅读全文
摘要:nonatomic vs. atomic - "atomic" is the default. Always use "nonatomic". I don't know why, but the book I read said there is "rarely a reason" to use "atomic". (BTW: The book I read is the BNR "iOS Programming" book.)readwrite vs. readonly - "
阅读全文
摘要:在很多代码里可以看到类似得用法:@interface MyClass:NSObject{ MyObjecct *_object;}@property(nonamtic, retain) MyObjecct *object;@end@implementatin MyClass@synthesize object=_object; (1)32位系统和64位系统的差异 在32位系统中,如果类的@interface部分没有进行ivar(instance variable)声明,但有@property声明,在类的@implementation部分有响应的@synthesize,则会...
阅读全文
摘要:SEL is a type that represents a selector in Objective-C. The @selector() keyword returns a SEL that you describe. It's not a function pointer and you can't pass it any objects or references of any kind. For each variable in the selector (method), you have to represent that in the call to @se
阅读全文
摘要:@interface MyClass : NSObject { NSString *name; NSArray *items; Something *something; IBOutlet NSTextField *myTextField;}@property (nonatomic, retain) NSString *name;@property (nonatomic, retain) NSArray *items; in the iPhone world, there's no garbage collector available. You'll have to...
阅读全文
摘要:From : http://useyourloaf.com/blog/2010/10/16/parsing-an-rss-feed-using-nsxmlparser.htmlStructure of an RSS feedBefore we get too much into the detail it is worth taking a second to look at the structure of anRSSfeed. A typical feed, with the most common elements looks something like this: Use ...
阅读全文
摘要:http://www.appcoda.com/how-to-add-splash-screen-in-your-ios-app/What’s Splash Screen?For those who are new to programming and haven’t heard of the term “Splash Screen”, let me first give a brief explanation about it. Splash screen is commonly found in iOS apps, as well as, other desktop applications
阅读全文
摘要:http://www.raywenderlich.com/10518/how-to-use-uiscrollview-to-scroll-and-zoom-contentGetting StartedFire up Xcode and create a new project with the iOS\Application\Single View Application template. EnterScrollViewsfor the product name, enter the company identifier you used when creating your App ID,
阅读全文
摘要:Create the Project and Design the InterfaceFirst, create a new Xcode project using the Single View Template. Let’s name the project as “MyLocationDemo” and set the project with the following parameters:MyLocationDemo Xcode ProjectOnce you’ve successfully created your project, go to the Storyboard an
阅读全文
摘要:The iPhone Core Data Example ApplicationThe application developed in this chapter will take the form of the same contact database application used in previous chapters, the objective being to allow the user to enter name, address and phone number information into a database and then search for speci
阅读全文
摘要:How To Delete a Row from UITableViewI hope you have a better understanding about Model-View-Controller. Now let’s move onto the coding part and see how we can delete a row from UITableView. To make thing simple, I’ll use the plain version of Simple Table app as an example.If you thoroughly understan
阅读全文
摘要:Assigning View Controller ClassIn the first tutorial, we simply create a view controller that serves as the detail view of recipe in the Storyboard editor. The view controller is assigned with the UIViewController class by default.Default View Controller - UIViewControllerLet’s revisit our problem.
阅读全文
摘要:http://www.appcoda.com/use-storyboards-to-build-navigation-controller-and-table-view/Creating Navigation Controller in StoryboardsNow let’s get our hands dirty and create our own Storyboards. In this tutorial, we’ll build a simple app that makes use of both UITableView and UINavigationController. We
阅读全文