This file contains 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
// method name | |
NSLog(@"%s", __func__); | |
// CGRect | |
CGRect rect = CGRectMake(100, 100, 100, 100); | |
NSLog(@"rect: %@", NSStringFromCGRect(rect)); |
This file contains 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
if [ -f ~/.bashrc ]; then | |
source ~/.bashrc | |
fi |
This file contains 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
:let $PATH .= ':/usr/local/git/bin' |
This file contains 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 <UIKit/UIKit.h> | |
@interface ScrollViewDelegate : UIView <UIScrollViewDelegate> { | |
UIPageControl *pageControl; | |
NSTimer *updateTimer; | |
} | |
- (void)switchStateHidden; | |
@end |
This file contains 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)startAnimation:(id)sender{ | |
UIButton *btn = (UIButton *)sender; | |
[btn animateWithDuration:0.5 | |
animations:^{ view.center = CGPointMake(0,0); } | |
// completion:^(BOOL finished){ [self endAnimation]; } | |
]; | |
} |
This file contains 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 animateWithDuration:0 delay:0 | |
options: UIViewAnimationOptionRepeat + UIViewAnimationOptionAutoreverse | |
animations:NULL completion:NULL ]; | |
// カンマ区切り(要カッコ) | |
[UIView animateWithDuration:0 delay:0 | |
options: (UIViewAnimationOptionRepeat, UIViewAnimationOptionAutoreverse) |
This file contains 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 <UIKit/UIKit.h> | |
int main(int argc, char *argv[]) { | |
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; | |
int retVal; | |
if ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) | |
retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate_iPad"); | |
else | |
retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate_iPhone"); |
This file contains 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
*.xcodeproj/* | |
!*.xcodeproj/project.pbxproj | |
/build | |
Classes/.* |
This file contains 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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
UIViewController *viewController = [[UIViewController alloc] init]; | |
[window addSubview:viewController.view]; | |
[window makeKeyAndVisible]; | |
return YES; |
This file contains 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)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event { | |
NSLog(@"%s", __func__); | |
UIViewController *viewController = [[UIViewController alloc] init]; | |
viewController.view.backgroundColor = [UIColor whiteColor]; | |
viewController.modalPresentationStyle = UIModalPresentationFormSheet; | |
[self presentModalViewController:viewController animated:YES]; | |
} |
OlderNewer