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
0
votes
1 answer

IOS:After returning back from UIImagePickerController layout became fullscreen

i hava an app layout like the image: It has a mainViewController with a header,footer,and a view between. Other ViewControllers load in to the Other view controllers view. (so header and footer are fixed for all other ViewControllers). Problem : In…
0
votes
0 answers

IOS - VCard Data not attaching properly

I'm trying to convert Vcard/vcf information in the form of JSON to an NSData object. When I try to attach the NSData object, it's not displaying properly. Am I missing a conversion step between the JSON information and the NSData…
duwerq
  • 99
  • 9
0
votes
2 answers

Objective-C: Reference class without init

Normally if I had Class 1 and I wanted to use it elsewhere, I would write Class1 *class1 = [[Class1 alloc] init]; to create a new instance. But what if I needed to reference variables in Class1 in another class and did not want to create a new…
Oh Danny Boy
  • 4,857
  • 8
  • 56
  • 88
0
votes
2 answers

Objc Blocks and memory management

I am setting up a block which gets called on a custom UIButton press. I am assigning the block to the UIButton instance in viewDidLoad(). - (void) viewDidLoad{ [super viewDidLoad]; _customBTN.block = ^{ self.test = @"Something"; …
0
votes
1 answer

How to get indexPath from one class to another

I have an app where my primary view is a tableview. where each cell loads another view containing certain data. Now, each cell is different so the data in the view loaded by each cell should be different. For that I need the indexPath. I've created…
Nick
  • 41
  • 1
  • 4
0
votes
1 answer

Problem with Function to convert UNIX TimeStamp

I get those two errors: - Can not use an object as parameter to a method - Incompatible types in return That's my code: - (NSString) dateStringFromUnixTimeStamp:(NSInteger)timeStamp { //Create Date-String from UNIX-Time-Stamp: NSDate *date =…
Pascal Bayer
  • 2,615
  • 8
  • 33
  • 51
0
votes
1 answer

Loading...Please wait for UIWebView - iPhone

In Safari and other browsers, there is a bar that would indicate the percentage of the loading progress, and I, myself, trying to implement something similiar on iPhone, when loading some content in UIWebView, I would like the app to indicate the…
niha7229
  • 13
  • 3
0
votes
1 answer

New warnings in XCode 6

Since I've been using XCode 6 I got some new warnings which I don't quite understand: Property type 'UITextView *' is incompatible with type 'NSString *' inherited from 'NSObject' 'copy' attribute on property 'description' does not match the…
Patricks
  • 715
  • 2
  • 12
  • 25
0
votes
4 answers

Setting shadowColor with property syntax gives compiler error: Expected identifier before '[' token

I have an iPad app in which I'm setting the shadow color of a UILabel in a UIView's initWithFrame: method. When I use the following syntax: m_label.shadowColor = [UIColor colorWithWhite:1.0 alpha:0.5]; I get this compiler error: Expected identifier…
sam
  • 3,399
  • 4
  • 36
  • 51
0
votes
3 answers

Replacing nulls with empty string from JSON response not working in iOS

I used below code to replace nulls from json response with empty string, but it is not working. Please help me out to fix this issue, i am getting nulls from server response in lot of scenarios and App crashes. Code: - (NSMutableDictionary…
Raj
  • 69
  • 6
0
votes
1 answer

RestKit - Map to a simple instance variable

I am quite new to RestKit. I know that the Object Mapping of Restkit is very powerful. However, in some case, I just want to map to a simple variable. For example, take a look at the following response: { "response": 400, "result": { …
chipbk10
  • 5,783
  • 12
  • 49
  • 85
0
votes
1 answer

How to repeat this action 3 times instead of repeating it forever- Sprite Kit

How to repeat this action 3 or 2 times instead of repeating it forever SKLabelNode *label = [SKLabelNode labelNodeWithFontNamed:@"AmericanTypewriter-Bold"]; label.text = @"Boom"; label.fontColor = [SKColor blackColor]; label.fontSize = 90; …
0
votes
1 answer

UIApplication sharedAppication error: program seems to be accessing wrong file

in my MainViewController implementation, I need to access variables from two different classes. one of the classes is the AppDelegate and the other is the FlipsideViewController. the way I accessed these was through this…
0
votes
1 answer

SimpleFTPUpload on Mac Os X

I was reading a post from you about a [3334:303] File read error error while trying to upload files via SimpleFTP source code. I am experiencing the same problem, I am using SimpleFTPUpload on a Mac Os X project. The file exists but when it gets…
Alfonso Tesauro
  • 1,730
  • 13
  • 21
0
votes
1 answer

Objective-C "Expression result unused"

I have declared a BOOL and am flipping it's value when a user presses a button. I do so like this: !self.isEditing;, but XCode warns me "Expression result unused" Can this cause problems? Should I instead do: self.isEditing = !self.isEditing;?
retrodev
  • 2,323
  • 6
  • 24
  • 48