This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)methodA | |
{ | |
id obj1; | |
id obj2; | |
id arp; | |
obj1 = [[Foo alloc] init]; | |
obj2 = [[Foo alloc] init]; | |
[obj1 autorelease]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIView * viewRoot = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 480, 320)]; | |
viewRoot.backgroundColor = [UIColor clearColor]; | |
UIView * view1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; | |
UIView * view2 = [[UIView alloc] initWithFrame:CGRectMake(480-100, 0, 100, 100)]; | |
UIView * view3 = [[UIView alloc] initWithFrame:CGRectMake(0, 320-100, 100, 100)]; | |
UIView * view4 = [[UIView alloc] initWithFrame:CGRectMake(480-100, 320-100, 100, 100)]; | |
[viewRoot addSubvier:view1]; | |
[viewRoot addSubvier:view2]; | |
[viewRoot addSubvier:view3]; | |
[viewRoot addSubvier:view4]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
int main() { | |
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |
NSMutableIndexSet * set = [NSMutableIndexSet indexSet]; | |
[set addIndex:111]; | |
[set addIndex:222]; | |
[set addIndex:333]; | |
[pool release]; | |
return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSLog(@"%@ %s", [self class], __func__); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "RootViewController.h" | |
@implementation RootViewController | |
@synthesize scrollView; | |
@synthesize contentView; | |
@synthesize views; | |
@synthesize button1; | |
@synthesize button2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)scrollViewDidEndZooming:(UIScrollView*)scrollView withView:(UIView*)view atScale:(float)scale | |
{ | |
self.scrollView = scale; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unionRect.origin.x *= self.scrollScale; | |
unionRect.origin.y *= self.scrollScale; | |
unionRect.size.width *= self.scrollScale; | |
unionRect.size.height *= self.scrollScale; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.segments = [NSArray arrayWithObjects:self.segment1, self.segment2, self.segment3, self.segment4, self.segment5, nil]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
int main() { | |
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |
NSMutableArray *myMutableArray = [NSMutableArray arrayWithArray:[NSArray array]]; | |
NSLog(@"%@", myMutableArray); | |
[pool release]; | |
return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
int main() { | |
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |
NSMutableArray *myMutableArray = [NSMutableArray array]; | |
[myMutableArray addObject:[NSString string]]; | |
[myMutableArray addObject:[NSString string]]; | |
[myMutableArray addObject:[NSString string]]; | |
[myMutableArray addObject:[NSString string]]; |