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

1
vote
2answers
2k 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
417 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
731 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
818 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
303 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
8k 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
337 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
765 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
87 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++) { ...
6
votes
2answers
6k 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
484 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
1k 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
309 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
2k 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
313 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 ...
4
votes
2answers
8k 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: ...
10
votes
1answer
5k 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 ...
6
votes
2answers
726 views

What is the standard for naming variables and why?

I'm going through some training on objective-c. The trainer suggests setting single character parameter names. The .NET developer in me is crying. Is this truly the convention? Why? For example, ...
0
votes
1answer
126 views

Go/Obj-C style interfaces with ability to extend compiled objects after initial release

I have a conceptual model for an object system which involves combining Go/Obj-C interfaces/protocols with being able to add virtual methods from any unit, not just the one which defines a class. The ...
0
votes
1answer
1k views

Best way to update UI when dealing with data synchronization

I'm working on a bug at work. The app is written in Objective-C for iOS based device, for the iPad. I'm the new guy there and I've been given a hard task. Sometimes, the UIButton text property does ...
1
vote
1answer
447 views

Incorporating GoF design patterns in Objective-C without Abstract/Virtual classes

As someone who is becoming more comfortable working in Objective-C I would like to be able to incorporate more design patterns and OOP features in my projects but struggle to implement them as ...
1
vote
1answer
569 views

Optimize strategies for xml parsing?

I am looking for general optimization tips and guidelines for xml parsing. One of the optimization strategies is of course selecting the "right" parser. A detailed comparison between the available ...
3
votes
3answers
5k views

Can I use a child class variables in its parent class?

I am programming in Objective C, iOS. I create a Class A which is a parent class, and Class B inherits to Class A. Now I have Class B variables which I also need to use in Class A. And also one ...
6
votes
2answers
3k views

Do people use const a lot when programming in Objective C?

Related: “sending 'const NSString *' to parameter of type 'NSString *' discards qualifiers” warning Sometimes, I think it's useful though. I may need to pass an a table and want to make sure that the ...
1
vote
2answers
2k views

Ongoing confusion about ivars and properties in objective C

After almost 8 months being in ios programming, I am again confused about the right approach. Maybe it is not the language but some OOP principle I am confused about. I don't know.. I was trying C# a ...
3
votes
2answers
1k views

Is it a good programming practice to have a class with several .h files?

I suppose the class have several different interfaces. Some it shows to some class, some it shows to other classes. Are there any good reason for that? One thing I can think of is with one .h per ...
0
votes
4answers
654 views

Objective-C message passing related queries

I am learning objective-C after having good knowledge of C/C++. I have 2 questions: Are Obj-C message passing and C++ vtable, two different ways of implementing polymorphism or Are they two very ...
9
votes
2answers
2k views

Properties under ARC: Always or public-only?

After reading an article humbly named "The Code Commandments: Best Practices for Objective-C Coding" by Robert McNally a little less than two years ago, I adopted the practice of using properties for ...
4
votes
7answers
1k views

Design patterns: moving object references around an application

I'm new to Programmers and I am looking to increase my knowledge of programming. Recently, a user on Stack Overflow told me using singletons is a bad idea, that they encourage tight coupling and that ...
6
votes
7answers
1k views

Should a class without instance variables be considered a class?

Say you need to implement a few closely related functions that provide a piece of functionality, but there is no need to track any state between those functions, they just sometimes pass some ...
8
votes
4answers
1k views

Where does Objective-C come from? C++ or C?

I am very confused about this programming language, Objective-C, which I heard is used to develop iOS applications. I know that it uses the principles of OOP. Would it be easier to learn if I already ...
13
votes
4answers
10k views

Where does Objective-C fall in the language performance continuum?

There seems to be a lot of discussion of the various speed merits to C or C++ as compared to say Java or Python, but I rarely see Objective-C mentioned. Roughly where does it fall in terms of language ...
3
votes
2answers
1k views

Who uses GnuSTEP?

This has been a big question lurking at the back of my head. From what I see, GnuSTEP nowadays is primarily a "hobby" project of a small but tightly-knit group of people. However I haven't seen a ...
0
votes
1answer
67 views

Direct Code Support?

A few times in the past I've hit a major wall and simply couldn't progress with a certain aspect of an app as Im a beginner and still learning the ropes (Objective-C specifically). I was curious if ...
3
votes
3answers
882 views

How to speak to a computer [closed]

I am a self-taught, novice programmer. The language I chose was Objective-C, so that I can write Apple applications and software. I have learned the hard way that Objective-C has a steep learning ...
1
vote
1answer
399 views

Is Rule 9 of Object Calisthenics applicable in Objective C?

Rule 9 in Object Calisthenics by Jeff Bay (RTF) is: Rule 9: No getters/setters/properties The last sentence of the previous rule leads almost directly to this rule. If your objects are now ...
4
votes
2answers
3k views

Is this a proper implementation of an iOS MVC pattern?

After browsing the apple docs, I came across this sample of their MVC pattern: Using NSNotificationCenter and without using KVO, would this diagram below represent a correct implementation of the ...
19
votes
7answers
1k views

Continuous Integration : which frequency?

I've always launched builds after each commit, but on this new project, the architects just asked me to change the frequency to "one build every 15 minutes", and I just can't understand why that would ...
3
votes
2answers
393 views

Component Diagram, what's next?

I'm working on an iPhone application and I created a component diagram. I defined interfaces for each component. For example I have an AI component and I have made some interfaces for it. How should ...
-1
votes
5answers
889 views

New to Programming/objective c [closed]

I've recently started to work on some iPhone apps, starting from a base where I had essentially no programming experience (I studied Maths & had very few programming modules) I worked my way ...
3
votes
5answers
629 views

When is it appropriate to develop a gui application, as opposed to a web application?

I've been thinking about an application that I want to develop for a while now. In short, I want this application to perform some crud operations. The application will be for a law firm so overall ...
4
votes
5answers
1k views

Are design patterns independent of programming languages?

I have been recently working on Objective C and came across use of Delegate pattern. I had seen most of the common patterns theoretically in Java, thanks to the Head First book. But at times looking ...
5
votes
1answer
635 views

New to iPhone Development - iOS5 Storyboard

I'm new here and pretty new to iOS development. My question is basically, should I learn the old school development methods or just learn how to do things using the latest tools (i.e. Storyboard)? ...
6
votes
3answers
6k views

Is it better to target iOS 5 and ARC or an earlier version with MRC?

I personally don't know much about iOS 5, but it seems like with automatic reference counting (ARC), you get rid of much of the memory management issues of the previous operating systems. So is it ...
2
votes
6answers
2k views

Is Big Nerd Ranch or AboutObjects iOS training worth it? [closed]

I have a CS undergrad degree and have been programming for several years with my current company, messed around with Objective-C by making a few console apps and a few simple apps that I ran in the ...
1
vote
3answers
180 views

Request Information from iPhone/Php developers

recently I hired a freelancer to develop an iPhone application for my website, this application will get information from the DB of the website, normally I should give to him the access to the DB to ...
68
votes
5answers
13k views

Clang warning flags for Objective-C development

As a C & Objective-C programmer, I'm a bit paranoid with the compiler warning flags. I usually try to find a complete list of warning flags for the compiler I use, and turn most of them on, unless ...
4
votes
4answers
1k views

Best practices for upgrading user data when updating versions of software

In my code I check the current version of the software on launch and compare it to the version stored in the user's data file(s). If the version is newer, then I call different methods to update the ...
3
votes
3answers
618 views

Is there ever a reason to use C++ in a Mac-only application?

Is there ever a reason to use C++ in a Mac-only application? I not talking about integrating external libraries which are C++, what I mean is using C++ because of any advantages in a particular ...