Using mixed projects you can face with several challenging situations. One of them is the allocation of Swift objects in ObjC code. The general problem that Swift objects doesn’t have an alloc method which is used to allocate the memory in ObjC ([[SwiftClass alloc] init]). To access the Swift object you should prefix it with @objc – or subclass […]
Category: Dev
Navigating back and forth among Viewcontrollers in Storyboard
In the old days if you wanted to present a ViewController you should call presentModal.. or push… in the code. The problem with this approach is that if you want to modify the presentation you should change the code. To separate this Apple found out the Storyboard – all your ViewControllers in one place. Visually representing the […]
Good reading about interviews
http://www.toptal.com/freelance/in-search-of-the-elite-few-finding-and-hiring-the-best-developers-in-the-industry
Coding Guidelines
General The main reason of this document is to help to achieve a clean code, which is: Readable: easily understandable – by other developers Maintainable: easily changeable by other developers as well Flexible: can be extended and add new functionality Testable: can be unit testable – where other classes are mocked even if the classes […]
Select items from a list without repetition
There are more solutions how to select items from a list randomly Initial steps: Cycle from 1 to N Select the item at random index, add it to the result array Solutions: if the item is already in the list skip. Drawbacks: your number of iterations could be huge Remove the item from the original […]
iOS/ObjC Interview Questions
General programming questions OOP basics: what is a class, interface, instance variable, methods, static (class) methods vs instance methods. Header vs implementation files What is a process, thread design patterns and principles blackbox vs whitebox testing differences? unit testing? integration testing? regression testing? what is continuous integration? difference between stack/heap General ObjC [expand title=”What do […]
Robert C. Martin: Clean Architecture and Design
Awesome (and funny) presentation about architecture, design, IT history and people. Watch, learn, enjoy:http://youtu.be/asLUTiJJqdE The same topic, same guy, still different presentations: http://vimeo.com/43612849 And another: http://youtu.be/DTk0DBpQveM And the newest: http://vimeo.com/68215570
Analyzing binary libraries on Mac
If you want to know the architectures a library supports, just call: lipo -info <libname> lipo is also used to create fat-binaries. If you want to look more deeply into a binary library the easiest way to use nm. NM will list the whole structure of the library together with the public classes/method. It’s under the […]
The case of missing IPA creation option in Xcode
IPA is technically a small install package of iOS platform. You can create it in XCode by creating an archive (Product/Archive menu point) and if the build is ready pressing the Distribution button on the right side of the appearing Organizer window. In the new appearing window just select Save for Enterprise or Ad-Hoc Deployment, sign with […]
ObjC ivar/global var declaration – a clarification
You can declares iVar-s in header files but it’s better in the implementation, so they will be really invisible for others. You should do this way: @implementation MyClass { int firstiVar; } @synthesize anyProperty; But what if you forget the parenthesis and you put the variable simply beside the @synthesize? Like this: @implementation MyClass int […]