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

0
votes
1answer
42 views

Delegate method privately called from delegate itself?

One has established design patterns so ingrained in their brain, that when sometimes somebody does something unexpected, it is a revelation. My colleague in an iOS project did call the delegate ...
-3
votes
0answers
21 views

How do you set the text of a label to an array value on Xcode? [on hold]

I would like to set a value of my array to a label. Array declaration: // // ViewController.h // Cornell Notes // #import <UIKit/UIKit.h> @interface ViewController : UIViewController{ ...
-1
votes
0answers
97 views

Is there a difference between writing/passing value with or without float “f” suffix? [migrated]

I believe I should type less if it's possible. Any unnecessary keystroke takes a bit a time. In the context of objective-C, my question is: Can I type this [UIColor colorWithRed:0 green:0 blue:0 ...
-1
votes
0answers
32 views

Using tar or zip format to store, retrieve, and delete files [closed]

I am looking for a solution to the following problem and wanted to get ideas and opinions from the community. I am implementing an HTTPLogger inside a logging framework. We are adding this as a custom ...
1
vote
2answers
95 views

How can NSObject contain an NSString if NSString is an NSObject

How can NSObject contain an NSString if NSString is an NSObject /* NSObject.h Copyright (c) 1994-2012, Apple Inc. All rights reserved. */ (NSString *)description; NSObject has a property named ...
0
votes
0answers
40 views

Difference between class clusters and abstract factory in cocoa

I have read that Obj-C class clusters are an implementation of the abstract factory. Can anyone explain if there are any differences between the 2 as design patterns. I read somewhere that there are ...
0
votes
0answers
48 views

Use Objective-C protocols like Java interfaces [duplicate]

I'm a Java developer moving to Objective-C. So far in Objective-C I've seen protocols used extensively to implement the delegate pattern, but I haven't seen then to add a layer of abstraction in the ...
0
votes
1answer
85 views

Significance of many-to-many relationships? [closed]

How important are to-many relationships in iOS programming? Do you often hold a list of pointers to objects in an array in your codes? I don't think I fully understand the concept of to-many ...
0
votes
1answer
154 views

In objective C, where does the inheritance chain end? [closed]

In objective C, classes are objects, but what object owns the class objects? I am trying to get as detailed an understanding of iOS programming as I can, and this question popped into my head, so I ...
1
vote
1answer
81 views

Is it bad practice to include two types of views in the same class?

In my app, I use a widget with a loading spinner to signify that a network request is waiting. On failure, there will be another view which contains a failure message and a "Reload" button. My ...
0
votes
2answers
146 views

How to remove redundant code that enables button. Or “if” statement

I got probably "micro optimization" problem. I got "History number", "Next Number", "Reset" buttons, as well "label" for text. Every time I click At "Next number" button I would like to show random ...
1
vote
4answers
150 views

Difference between the two enums

I came across an enum definition :- typedef enum NSInteger { kBorderTypeNone = 0, kBorderTypeLeft = 1 << 0, kBorderTypeRight = 1 << 1, kBorderTypeTop = 1 << ...
0
votes
1answer
110 views

detect if a combination of string objects from an array matches against any commands

Please be patient and read my current scenario. My question is below. My application takes in speech input and is successfully able to group words that match together to form either one word or a ...
3
votes
1answer
97 views

Testing: Should I wrap system notifications and send my own?

In the current Cocoa app I'm working on, I've got an object, RecordScheduler, which responds to two types of notifications, "day did pass" and "quicksaving interval did pass". In both cases, the ...
1
vote
1answer
159 views

Create an Objective-C category to route methods depending on a specified type

For one project, I needed to find a solution to avoid code like this: if ([self.desiredColor isEqualToString:@"Red"]) [self constructRedMenu]; else if ([self.desiredColor ...
0
votes
0answers
47 views

How do I get fluid gesture motion in third party maps app on iOS?

There are a couple of apps on the App Store that use external map sources, for various reasons, to display map data. Some even have multiple sources for bike traffic and so on. However some of them ...
0
votes
2answers
114 views

Is it acceptable to use C11 generic macros in Objective-C to box numbers?

I was getting tired of repeating types when writing things like this: NSDictionary* d = @{@"so": [NSNumber numberWithInt:index]), @"much": [NSNumber numberWithBool:accepted]), ...
-2
votes
3answers
128 views

Is explicit else needed in initialisers? [duplicate]

I have a custom designated initialiser like this: - (id)initWithLocation:(CLLocation *)location { if (location == nil) { return nil; } self = [super init]; if (self) ...
-6
votes
3answers
552 views

Are Extension methods (C#) and categories (Objective-C) the same as traits? [closed]

According to: Something similar to Objective-C categories in other languages? Static extension methods in C# are basically the same thing as Objective-C categories, so I'm going to lump these two ...
5
votes
1answer
216 views

Can anyone explain to me what problem Core Data solves? [closed]

Core Data seems to add a needless layer of complexity. If you want to save data created natively by the user in an app why not just use an object and then write the data all to SQLite or back to a ...
1
vote
4answers
951 views

Should I learn Objective-C if I don't want to make iOS applications? [closed]

As a Windows programmer in C/C++/Java languages, is there any other purpose for Objective-C other than developing on Cocoa and Mac iOS products? Would there be any use for a Windows programmer to ...
1
vote
0answers
103 views

Designing object oriented programming

Basically, I want to make api calls using an SDK I am writing. I have the following classes: Car CarData (stores input values needed to create a car like model, make, etc) Basically to create a ...
1
vote
0answers
80 views

Objective-C Lesson in Class Design

I have the following classes: Teacher Student Class (like a school class) They all extend from KObject that has the following code: - initWithKey - send - processKey Teacher, Student ...
1
vote
1answer
158 views

Custom animation iOS

I have seen animation, and i can't figure out how to do something like in this video(youtube). I want to discuss how it's made. I don't think that they're using sprites. I have one idea how to do ...
0
votes
2answers
648 views

Basic Objective-C Questions

I'm new to objective C, I'm following "Objective C 5th Edition Stephen Kochan and I don't have anyone to ask my doubts to. I'm confused with this question: Q. Is it necessary to use "-" or "+" before ...
0
votes
1answer
269 views

Design pattern for locking asynchronous operations in Objective-C

I'm writing my first Objective-C Class. It's responsible for interaction with an HTTP SSO authentication service. The process requires multiple HTTP transactions in order to complete. The Class acts ...
2
votes
1answer
363 views

When to use embedded script language?

I already read some post about the why use embedded script language but I want to ask when to use it. I have implemented an Objective-C / Javascript binding framework which allow me to write ...
0
votes
6answers
551 views

What are the reasons to create UIView subclass?

I've noticed that there are a lot of UIView subclasses in my legacy project. Mostly the only reason of such a subclass is to split bigger view into custom subviews and provide layout for its subviews ...
7
votes
3answers
252 views

Where should I put methods that make an Http Request to get data from a web service in iOS development?

I have a Model Car in my iOS application where it's parameters like name, year, value etc are fetched from a web service in order to fill a list with cars data. Where should I put the method that ...
3
votes
3answers
285 views

In Objective C, what English words can I conceptually associate to the symbols?

I'm learning Objective C (from a C# background) and am having difficulty understanding the unusual method signatures and am looking for a shortcut to make the learning curve less steep. When reading ...
2
votes
2answers
251 views

Is state pattern a good solution for implementing UI changes for Landscape and Portrait modes?

For our iOS app, a lot of complicated UI logic depends on the interface orientation of the ViewController. This conditional logic is present in a lot of places. Can it be segregated into different ...
0
votes
1answer
215 views

Apple Dispatch Queue vs Threads

I've heard a lot about apple's famous dispatch queues and the GCD but today was the first time I decided to understand exactly what is going on, so I started reading Concurrency Programming Guide and ...
0
votes
4answers
307 views

What can I do without the iPhone SDK and Xcode? [closed]

I want to develop an iPhone application, I do not have Xcode nor the iPhone SDK (nor a macbook but I plan to buy one). What could be done without those products? Edit: I intend to release it on ...
2
votes
4answers
272 views

What is the proper way to store an object with many attributes in Objective-C?

I have an object that I am downloading over HTTP, that has approximately 50 attributes. What is the proper way to store this information in Objective-C? Should I have an NSObject with a property for ...
23
votes
3answers
979 views

Is it considered a bad practice to add logic in a property setter?

I jumped in to a project and I see that the other developers are adding a lot of logic in the setters of synthesized properties. I understand how this works, but I think that it makes it hard to ...
3
votes
3answers
384 views

Why use protocol, not call the method directly?

I was asked this question in an interview. For eg: UITableviewDelegate protocol has CellForRowAtIndexpath. Why make it a delegate method in a protocol not a method in the UITableView class and call it ...
1
vote
2answers
530 views

High Schooler learning to program (Objective C) on my own — What are the essential things I need to learn? [closed]

About a year and a half ago I became interested in learning to program (specifically, iOS). Since my school currently lacks computer science classes (well next year they say they might have one using ...
0
votes
1answer
236 views

Which is faster NSDictionaries or object properties?

If I abandon creating model objects which I only use to pass information and use NSDictionaries instead and have constant for keys in the same place where I am using the model, then does it have any ...
1
vote
2answers
382 views

Why do we use networking libraries instead of plain NSURLRequests and NSURLConnection ?

in iOS development, I have often seen people creating a networking module to interact with their APIs. This module generally sits on top of a networking framework like MKNetWorkKit or AFNetWorking. ...
0
votes
1answer
149 views

Truth condition testing with BOOL

BOOL myBool; myBool = YES; ... if (myBool) { doFoo(); } I have read that because there are instances where the above does not actually call the doFoo() function, it is best to instead always test ...
1
vote
2answers
183 views

PayPal proof of payment - is there a need to store it at our server?

I am developing an iPhone app, which I am integrating with PayPal. I did it successfully using PayPal library. I am testing it on sandbox mode. When I transfer money from one account to the other ...
0
votes
1answer
124 views

NSException in init when having a custom designated initialiser?

I have a custom View Controller that is a subclass of UIViewController that requires a data object to be set up properly. Without this object, showing the VC doesn't make any sense. So I created a ...
4
votes
1answer
648 views

Getting rid of Massive View Controller in iOS?

I had a discussion with my colleague about the following problem. We have an application where we need filtering functionality. On any main screen within the upper navigation bar, there is a button ...
2
votes
2answers
863 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
515 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
417 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 ...
1
vote
1answer
846 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
170 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
112 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
533 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 ...