Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone App Development - Few beginner questions

I've been tasked with creating an app, but I have zero experience with iOS development. I have general programming knowledge, particularly with Java, JavaScript and PHP (I'm more a web developer than a programmer). I have dabbled with C, Xcode and various other languages and IDEs in the past, but I remember very little.

I've been following Apple's Developer Library tutorials, and I'm at around the Language stage, where I'm come to a grinding halt. While I slowly progress through learning the basics of Objective-C, there are a few things I'm very confused about regarding development in Xcode that various tutorials seem to completely skip over or just imply that you know what to do, or some just stop right before the part I'm having trouble with.

1) Storyboard - yes or no?

Is it better to start with an empty application and work with the files or create a template (in my case a tabbed application) and work with the storyboard?

2) If using a storyboard, do I still need to have a .xib?

Are the User Interfaces more like global templates that the view controllers implement?

If I wanted a different layout for each tab of my app, would I create a .xib for each tab, or just edit the controllers in the storyboard? Am I correct in understanding that the storyboard can have multiple instances/relationships of the same controller, in which case having .xib's would make more sense?

3) If using storyboard, where do the implementation and source files come from?

This is probably a stupid question. I know you can just add them via File -> New, but I don't know how to associate those files with a view controller. Is there a way to have the files created automatically when adding a controller into the storyboard?

like image 705
Robert Gillman Avatar asked Sep 04 '13 05:09

Robert Gillman


People also ask

What is the basic development language for iPhone apps?

Swift is a powerful and intuitive programming language for iOS, iPadOS, macOS, tvOS, and watchOS. Writing Swift code is interactive and fun, the syntax is concise yet expressive, and Swift includes modern features developers love.

Which tool is used for iOS app development?

Xcode. Apple has introduced Xcode, a tool for creating Swift applications for iOS devices. It is the first choice for new developers to create applications for the Mac, iPad, iPhone, Apple Watch, and Apple TV.

Is it easy to develop apps for iOS?

Most mobile app developers find an iOS app is easier to create than the Android one. Coding in Swift requires less time than getting around Java since this language has high readability. In the future, however, as Kotlin develops further, the tables may turn once again.


1 Answers

Since you're just starting, you should use Storyboards because it lets you link different view controllers(pages on your app, essentially) visually and outside of code. For example, you can link your UITabbedViewController (the part that manages the content of the other tabs) to the pages that represent the content of the different tabs. Basically, your storyboard would have the tabbed view controller in a parent-child relationship with the sub-controllers. You would have one instance of each -- the tabbed view controller, managing an instance of each of the tabs' content and controller. This is the same regardless of Storyboard or xib, but you can connect this more easily in the storyboard.

You can still use a .xib(nib) file for stuff like Custom Table cells or in cases where you want to separate a view element or controller from a storyboard where there are other constraints.

In the storyboard, you subclass the controller class on the sidebar in the visual editor by entering your subclass of say UITabbedViewController in 'Custom Class'. In your file associated with 'MyTabbedController', you implement your stuff.

Great book:

http://www.barnesandnoble.com/w/beginning-ios-6-development-david-mark/1113216077?ean=9781430245124

Good luck!

like image 121
Nick C Avatar answered Oct 24 '22 06:10

Nick C