Objective-c is a highly dynamic message-based object-oriented language, superset of C, that is a primarily used for programming Apple's Mac OS X and iOS platforms.

learn more… | top users | synonyms

2
votes
2answers
1k views

Programming against a protocol in Objective-C

I stumbled accross the SOLID principles. There is one burning question. Should I always use protocols? I never saw someone using them in the way that a Java developer would use them. I tried it in a ...
2
votes
4answers
524 views

Is Objective C a reasonable way to learn C?

I want to learn C but I tend to learn best when I have a project to work on. I've never done iPhone development, so I'm hoping to kill two birds with one stone. Will learning objective c also teach me ...
2
votes
2answers
455 views

What is expected of an intern iOS SDK programmer from self-taught arena? [duplicate]

edit: I'm asking for samples an intern would want to show, please don't answer soft-skills that get this marked as a dupe, it is NOT. To be more specific, what sample apps and background, is minimum ...
2
votes
1answer
1k views

Why is it impossible for Google to port V8 along with Chrome's codebase in C/Obj-C on iOS?

Google has given a reason that All apps on iOS have to run in the sandbox environment except for special apps by apple that get to tap into some private APIs. So Chrome on iOS uses whatever the ...
2
votes
1answer
191 views

Objective C - nested messages … confusion about

Wonder if anyone could shed some light on this messaging construct: The documentation says that messages appear btwn brackets [] and that the msg target/object is on the left, whilst the msg itself ...
3
votes
2answers
131 views

Is it a good idea to put declaration of protocols for delegates in a private category interface?

I have a View Controller or a View that implements delegate and dataSource methods of UITableView. These methods are not going to be used outside this class. So is it a good idea to make the ...
1
vote
1answer
711 views

How to implement a Theme for View Controllers in an iOS app?

I have an application, where font size, font type, color, background color, image and a lot of things change based on theme. I realised in the beginning itself that using enums to denote themes and ...
-1
votes
1answer
95 views

Using third party/ open source controls [closed]

I usually feel reluctant to use any third party or open source controls while coding in Objective-C iPhone due to following reasons. Open source controls are developed in incremental manner. So once ...
3
votes
2answers
337 views

What is the most appropriate testing method in this scenario?

I'm writing some Objective-C apps (for OS X/iOS) and I'm currently implementing a service to be shared across them. The service is intended to be fairly self-contained. For the current functionality ...
3
votes
3answers
628 views

Why did Apple choose to design its programming language with future and past tense method names?

There are a lot of methods like this in iOS/Objective C: - viewDidLoad - viewWillAppear: - applicationDidFinishLaunching I've just been having a discussion with some colleagues about this design ...
1
vote
1answer
142 views

How to embed an article in the source code?

Sometimes, I notice typos in articles (blog posts) or books in source code that appears in the body of the article. It may be an indication that the code has been manually copied and pasted (e.g. ...
4
votes
1answer
863 views

Objective-C class cluster pattern

I have many sublcasses of one class. I choose concrete class based on type (simple enum). I like idea of class cluster. Should i use it or just create factory class (but each class in objective-c is ...
1
vote
1answer
275 views

Implement a file system for ios devices

I've read that ios apps can communicate via unique urls. An online tutorial on tutsplus says Communication between apps provides your application with an opportunity to take advantage of other ...
3
votes
3answers
1k views

What is a static method compared to instance/class/private/public methods?

I'm learning programming in Objective-C and I can't understand what a static method is. I know what class/instance/private/public methods are. Can someone explain what it is using an example and ...
0
votes
1answer
66 views

Program Structure for Table Cells Representing Objects

So I have a program with "cue" objects and each have their own table cell. The thing is that the table cells have loading bars on them that represent the progress of the cues. This presents the ...
0
votes
1answer
331 views

Is object-oriented conceptual thinking something you build with experience? [closed]

I know that the answer is pretty clear because you get better on everything with time and experience. But I'll tell you where I'm coming from: A couple of months ago I decided to learn iOS ...
2
votes
4answers
248 views

Should I read a chapter about Memory management if now a days we mostly use ARC?

I'm reading a book on Objective C, and I was wondering about 2 things: Should I take the time currently to read a whole chapter on memory management? If you are doing a really good job on manual ...
0
votes
2answers
265 views

Why is “working with files” is an important subject when learning Objective C?

I'm reading a book on Objective C, and I was wondering how important the subject Working with files for learning to develop iOS in particular? On you tube the tutorials are very short, maybe 10 min ...
4
votes
3answers
711 views

C++ vs Objective-C design principles of setters and getters

In C++ I was told that my classes shouldn't have getters and setters: Doing it wrong... blog post. On the other hand, in Objective-C, the direct use of ivar is discouraged, because the getters allow ...
2
votes
1answer
550 views

Can Objective C categories serve the same purpose as Traits do in Scala?

The statement of the question seems little abstract to me, so please read the details below. Since the time when C++ was the first choice Object Oriented Language for almost anything, we had a big ...
10
votes
4answers
3k views

success:/failure: blocks vs completion: block

I see two common patterns for blocks in Objective-C. One is a pair of success:/failure: blocks, the other is a single completion: block. For example, lets say I have a task that will return an object ...
4
votes
2answers
865 views

Core data syncing (deletion) using a custom REST web service

I need to sync my local core data stack against a server running a persistent data storage underneath the covers. (I've gone through other posts here and on SO on similar topics) My requirements: ...
0
votes
1answer
668 views

Preventing override of methods in Objective-C [closed]

Objective-C lacks private methods or java-esque final methods. This means that it is possible for a subclass to (accidentally) override some of the internals of a superclass. How does one prevent ...
1
vote
1answer
258 views

How to avoid huge functions with made up of enums and if-else or switch case when dealing with server response in iOS?

in my application, I have a request type associated with variety of API calls I make to the REST server. when the response from server comes in the same delegate method for web engine's response, I ...
0
votes
1answer
776 views

Pictures from iPhone to clients FTP server - Directly (iPhone->FTP) or Cloud (iPhone->Amazon->FTP)

My clients wants to take pictures with their iPhone's and place them collectible on their server, suggested by FTP. I can see there is two solutions: Directly upload from the iPhone to the FTP ...
4
votes
2answers
921 views

What patterns book for iOS development contains this specific information? [closed]

I've read several books on iOS development and Objective-C, however what a lot of them teach is how to work with interfaces and all contain the model inside the view controller, i.e. a ...
1
vote
3answers
626 views

When should one use “out” parameters?

In Objective-C, there are several methods like initWithContentsOfFile:encoding:error: where one passes in a reference to an NSError object for the error: parameter. In this example, the value of the ...
2
votes
4answers
396 views

Strategy for avoiding duplicate object ids for data shared across devices using iCloud

I have a data intensive iOS app that is not using CoreData nor does it support iCloud synching (yet). All of my objects are created with unique keys. I use a simple long long initialized with the ...
3
votes
6answers
4k views

Why was Objective-C popularity so sudden on TIOBE index?

I'd like to ask a question that is pretty similar to the one being asked here, but for Objective-C. According to TIOBE rankings, the rise of popularity of Objective-C is unprecedented. This is ...
6
votes
1answer
277 views

What is the convention for the star location in reference variables?

I have been learning Objective-C, noting that different books and examples use differing conventions for the location of the star (*) when naming reference variables: MyType* x; MyType *y; MyType*z; ...
2
votes
2answers
348 views

Objective C style nil in java?

Objective C has a concept of a nil object which would accept any method call with any parameters without complaining and silently return another nil. I have used something similar in Java using ...
2
votes
2answers
192 views

see what ARC does?

If I understand correctly, all ARC does is automatically add memory-management statements such as retain and autorelease in the proper places in a program. Is there any way to see all the ...
1
vote
2answers
792 views

Adhering to a protocol and being a subclass at the same time?

In objective C, I have a situation where I would like to have an abstract protocol (interface) with 5 methods and 4 properties, but at the same time, I'd like to have a common implementation of 3 of ...
3
votes
4answers
338 views

Is conditional return type ever a good idea?

So I have a method that's something like this: -(BOOL)isSingleValueRecord And another method like this: -(Type)typeOfSingleValueRecord And it occurred to me that I could combine them into ...
3
votes
2answers
551 views

Something similar to Objective-C categories in other languages?

I understand Objective-C categories and how they become useful, but I always have a hard time explaining the concept to other programmers that are not familiar with Objective C. Maybe I'm just bad ...
4
votes
2answers
717 views

Design pattern and best practices [closed]

I am an iPhone developer. I am quite confident on developing iPhone application with some minimal feature. I would consider myself as a fair application developer but the code I write is not so much ...
5
votes
2answers
241 views

Data structures for storing finger/stylus movements in drawing application?

I have a general question about creating a drawing application, the language could be C++ or ObjectiveC with OpenGL. I would like to hear what are the best methods and practices for storing strokes ...
6
votes
5answers
4k views

Is there a way to publish IOS app from windows/Linux?

I have been using Linux (especially, Ubuntu) and Windows 7 for a long time. I want to publish iOS apps, but I don't have a Mac or an iPhone. I don't have anyone near me who will lend me a Mac, and I ...
1
vote
2answers
239 views

Let a model instance choose appropriate view class using category. Is it good design?

Assume I have abstract base model class called MoneySource. And two realizations BankCard and CellularAccount. In MoneysSourceListViewController I want to display a list of them, but with ListItemView ...
5
votes
8answers
636 views

Learning OO for a C Programmer [closed]

I've been programming professionally in C, and only C, for around 10 years in a variety of roles. As would be normal to expect, I understand the idioms of the language fairly well and beyond that ...
2
votes
1answer
80 views

What is the name of the method to find index from array, in Objective-c?

I have a following method to find index of a book object which have a book name: +(NSInteger)indexXXX:(NSString *)bookName XXX:(NSArray *)books { for (NSInteger i = 0; i < books.count; i++) { ...
5
votes
2answers
4k views

Best Way To Bring C++ Into Objective-C Project

For an upcoming XCode iOS project I'm planning on writing my views and view controllers in Objective-C. My model will be provided to me in C++. I am aware of 2 ways of using C++ in an objective-c ...
2
votes
2answers
464 views

Is there any advantage to learning C first?

I've got a little bit of history with programming, having gotten my start with Visual Basic. I let it slide as a hobby from a little after VB6 up until just a year or so ago when I got on the iPhone ...
-3
votes
2answers
789 views

What's the benefit of a singleton over a class in objective-c?

They both seem to take about the same amount of effort to use: Singleton: needs a .h and .m file, has to be imported into any class you want to call it from and then has to be instantiated How is ...
1
vote
3answers
276 views

How to indicate the word is method name in Objective-C?

You can indicate that XXX is method name by writing XXX(). But in Objective-C, you can not write XXX() for XXX method. If you write XXX, you can't tell if XXX is method name or other type of ...
-2
votes
1answer
1k views

in Objective-C, value of type double/float can only be NAN, INFINITY, & normal number?

I knew double or float value can be not only normal value(-1.3, 0, 1.0, 2.3) but also NAN and INFINITY in Objective-C. Is there other special values except for NAN and INFINITY for double/float value ...
0
votes
1answer
237 views

How can I create a software patcher for OS X?

I'm building some software for OS X that isn't distributed through the Mac App Store. My software allows users to download different modules uploaded by various people too. How can I create a ...
5
votes
2answers
1k views

WWDC 2012 announced features on iOS 5?

I am relatively new to iOS development, so after watching a bunch of WWDC videos announcing new awesome features for the iPhone SDK, I still got a few questions regarding their support for older ...
3
votes
2answers
5k views

IOS Variable vs Property

Just started diving into Objective-C and IOS development and was wondering when and the correct location I should be declaring variables/properties. The main piece of code i need explaining is below: ...
8
votes
2answers
3k views

Organizing code for iOS app development

I've been developing an app for the iOS platform, and as I've been going along, I've noticed that I've done a terrible job of keeping my files (.h, .m, .mm) organized. Is there any industry standards ...