Questions tagged [objective-c-2.0]

Objective-C 2.0 is a revision of the Objective-C language created by Apple to include, amongst other things, an enhanced syntax.

Objective-C 2.0 is a revision of the Objective-C language created by Apple to include, amongst other things, an enhanced syntax.

177 questions
26
votes
4 answers

Does Objective-C support Mixin like Ruby?

In Ruby, there's Modules and you can extend a class by "mixing-in" the module. module MyModule def printone print "one" end end class MyClass include MyModule end theOne = MyClass.new theOne.printone >> one In Objective-C, I find that…
hacksignal
  • 633
  • 1
  • 7
  • 11
19
votes
11 answers

(null) libc++abi.dylib: terminate called throwing an exception

I use Xcode 4.5PR and iOS 6beta 2. I didn't change any codes, my application throw an exception mentioned in the Title. I used Debug Window which function caused this exception, but it showing 0x38dda960: push {r4, r5, r6, r7, lr} How can I find…
Masaru Kitajima
  • 267
  • 1
  • 4
  • 12
12
votes
7 answers

Xcode: How To Create A PopUp View Controller That Appears In Another View Controller

Basically what I am trying to figure out to do is, say I have one View Controller, called V1, that has a regular view inside it and a button. Now, when you tap that button, I want that button to create an action that pop-ups another View Controller,…
rs14smith
  • 121
  • 1
  • 1
  • 3
10
votes
2 answers

__strong and __weak keyword placement - Objective-C

The compiler seems to have no problem with the two following declarations: NSObject * __weak weakThing; __weak NSObject *anotherWeakThing; Is there a difference between the two? Is the behavior like the const keyword? I ask because Xcode's warning…
edelaney05
  • 6,822
  • 6
  • 41
  • 65
10
votes
1 answer

Objective C: ARC with IVars declared in implementation file

I found an interesting post describing how, in Objective-C 2.0, instance variables can be declared in the implementation file. Consider this example: @interface MyClass {} @end @implementation MyClass { NSObject *obj1; NSObject…
ocarlsen
  • 1,312
  • 2
  • 16
  • 20
10
votes
1 answer

Error "Create a concrete instance!"

I've got another problem in the same code... I'm getting this error: initialization method -initWithCharactersNoCopy:length:freeWhenDone: cannot be sent to an abstract object of class NSString_RegEx: Create a concrete instance! But I don't…
dododedodonl
  • 4,585
  • 6
  • 30
  • 43
8
votes
5 answers

Planning on writing operating system in Objective-C

At the moment I'm learning objective c 2.0, and soon I plan on learning assembly language, so I can write an operating system. I know it won't be easy, and I know it will take months, perhaps years, of time and patience. However, I plan on writing…
Nick
  • 81
  • 1
  • 2
8
votes
3 answers

Objective-C Address of property expression

I need access address of property but have problem. example code is @interface Rectangle : NSObject { SDL_Rect wall; SDL_Rect ground; } @property SDL_Rect wall; @property SDL_Rect ground; @end @implementation Rectangle @synthesize…
unknow
  • 869
  • 1
  • 7
  • 10
7
votes
2 answers

What do you bind NSArrayController's Managed Object Context to in Xcode 4?

I am trying to build an document-based application for beer reviewing that allows you to enter your notes. I have built the model in Core Data and the view in Interface Builder. Following some Xcode 3-based tutorials, I am told to connect the new…
sj660
  • 81
  • 1
  • 5
7
votes
1 answer

NSLog(@"%d", a) NSLog(@"%g", a); difference between @"%d" and @"%g"

#import int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; // insert code here... NSLog(@"Hello, World!"); float a = 12.3454323; NSLog(@"%d", a); …
vogue
  • 81
  • 1
  • 1
  • 3
6
votes
3 answers

How can I create object and use it in Objective-C?

I am using Buildbox for my game. I implemented custom rewarded ads. The problem is that game music continues when rewarded video is open. I want to mute and unmute after video is watched. I know Java but I am not good in Objective-C and Cocos2dx.…
gurkan stack
  • 413
  • 1
  • 15
  • 43
6
votes
2 answers

Is any memory leak in iOS accepted at all?

I am new to Objective-C (coming from Java) and I think I am getting a pretty good understanding of memory management. But when my app loads, I get a extremely small memory leak, that only occurs when the game is loading (we are talking about 32 to…
hogni89
  • 1,920
  • 6
  • 22
  • 39
6
votes
1 answer

How to test property existence and type based on NSString typed key?

In my quest to update a Core Data model within my iOS project, I'm querying a server for JSON objects that correspond - to some extent - with the managed entities of my model. The end result I'm striving for is a reliable update solution from JSON…
epologee
  • 11,229
  • 11
  • 68
  • 104
5
votes
4 answers

What is the point of @property and @synthesize?

I haven't been able to figure it out, and there are no websites which explain it clearly enough... what exactly are the purposes of @property and @synthesize? Thanks in advance!
esqew
  • 42,425
  • 27
  • 92
  • 132
4
votes
2 answers

Keyboard covers up my UIViewController?

I have a UIViewController which has a UITextView and UIImageView, when the keyboard comes up it covers up my UITextView. so how can i do to manage that and the same for the UITableView?
keep on you
  • 310
  • 6
  • 21
1
2 3
11 12