- How to create (access) AppDelegate object
projectNameAppDelegate* sharedApplication = (projectNameAppDelegate *)
[[UIApplication sharedApplication] delegate];
[[UIApplication sharedApplication] delegate];
Using this Object you can access main Window also.
2. Scheduling to method
[NSTimer scheduledTimerWithTimeInterval:1.0f target:self
selector:@selector(didFinishMainURL) userInfo:nil repeats:NO];
3. Re-create frame parameter from existing frame
UIImageView *imageView = [productRowData objectForKey:@"product_image"];
CGRect rect = imageView.frame;
rect.size.height = 80;
rect.size.width = 75;
imageView.frame = rect;
imageView.tag = 0; // tag our images for later use when we place them in serial fashion
CGRect frame = imageView.frame;
//frame.origin = CGPointMake(15, 3);
frame.origin = CGPointMake(0, 0);
imageView.frame = frame;
4. When you debug the code, use this code directly to display 'Method Name'
NSLog(@"%s", __FUNCTION__);
int dlpInt = (([rowData valueForKey:@"DLP"] == [NSNull null]) ? 0 : [[rowData valueForKey:@"DLP"] intValue]);
NSString *dateString = (([rowData valueForKey:@"DATE"]
== [NSNull null])
? @"" : [rowData valueForKey:@"DATE"]);
6. When implementing delegate
if ([_delegate
respondsToSelector:
@selector(onScoresSubmitted:)]) {
[_delegate
onScoresSubmitted:success];
}
7. Xcode general directory key word
- "$(SRCROOT)" - Project directory
- "$CONFIGURATION_BUILD_DIR" - Project build directory
No comments:
Post a Comment
Add your comment