Hello, I have jut started using Objective-C and Object Oriented programming in general. Could somebody please help me with this somewhat simple coding?
Although this is relatively simple in programming terms, i am trying to make it so that the NSLog I create will show up on the IPhone screen and not just in the console window. In other words, what needs to be used instead of NSLog etc.
Sorry it's a bit basic, but after years of working with languages like Basic, C has always bewildered me. This answer seems to specific for books to answer.
Thanks for any help you can give me.
Abunga.
Code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
UILabel *myMessage;
int value1;
int value2;
value1 = 10;
value2 = value1 * 2;
myMessage=[[UILabel alloc] initWithFrame:CGRectMake(25,225,300,50)];
NSLog(@"The value is %d.", value2);
[window addSubview:myMessage];
[window makeKeyAndVisible];
return YES;
}
Although this is relatively simple in programming terms, i am trying to make it so that the NSLog I create will show up on the IPhone screen and not just in the console window. In other words, what needs to be used instead of NSLog etc.
Sorry it's a bit basic, but after years of working with languages like Basic, C has always bewildered me. This answer seems to specific for books to answer.
Thanks for any help you can give me.
Abunga.