Create an iPhone app programmatically, completely

Recently, I became interested in developing applications for the iPhone, so I watched online tutorials and also read a book, trying examples when I go.

I'm getting better, but one of the things that I still find pretty annoying about the normal development model is that I really don't know what the SDK really does behind the scenes for the application to work, because Apple protects me from of this. For example, when I make connections to the interface builder, this, apparently, corresponds to the code generated somewhere ... Where this code is and what it does and how it works is not obvious (for me).

So I wonder if it’s possible to completely create an iPhone app? That is, the start begins with some basic method, which will then programmatically create any views, register event listeners, etc. And if so, what are some good resources for something like this?

+3
source share
4 answers

No generated code. This is serialization. The Builder interface serializes the object tree into a .xib file, your application deserializes it back.

Of course, you can also create your own interface in code, it's just more code. In earlier versions of the SDK, this was even necessary because Interface Builder was not yet available.

+9
source

, . XCode "Window-based app", . applicationDidFinishLaunching, "" - , view, .

+2
I'm getting better, but one of the things I still find quite annoying about
the usual development model is that I really have no idea what the SDK is really 
doing behind the scenes to make the app "work" because Apple protects me from 
this. For example, when I make connections on interface builder, this presumably 
corresponds to code being generated somewhere... Where that code is and what it 
does and how it works are not obvious (to me).

. IB IBOutlets, , , , . Nib ( ) Xib ( IB ) , Nib, https://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html#//apple_ref/doc/uid/10000051i-CH4-SW8

, IB , .

+2

:

:

, XML . XIB , , Xcode , XML , .

There are many tools that develop iPhone designs for the iPhone; perhaps the most popular are Unity . There is also an open source Titanium adventure project . This is a great project for independent work, so I would recommend submitting an application to help one of the open source projects that are already there until you get comfortable with it before you try to leave and invent the best wheel again.

+1
source

Source: https://habr.com/ru/post/1738791/


All Articles