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
NSDictionary *attr = [[NSFileManager defaultManager] attributesOfItemAtPath:[url path] error:nil]; | |
NSLog(@"File Attributes=%@", attr); | |
/* | |
ex) | |
File Attributes={ | |
NSFileCreationDate = "2012-11-26 10:24:39 +0000"; | |
NSFileExtensionHidden = 0; | |
NSFileGroupOwnerAccountID = 501; | |
NSFileGroupOwnerAccountName = mobile; |
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 | |
{ | |
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; | |
TopController *controller = [[TopController alloc] init]; | |
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:controller]; | |
[nav setNavigationBarHidden:NO]; | |
self.window.rootViewController = nav; | |
[controller release]; | |
[nav release]; |
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
#ifdef DEBUG | |
#define LOG(fmt, ...) NSLog((@"[%@] " fmt), NSStringFromSelector(_cmd), ##__VA_ARGS__); | |
#define LOG_PRINT(fmt, ...) NSLog((@"%s " fmt), __func__, ##__VA_ARGS__); | |
#define LOG_METHOD NSLog(@"%@/%@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); | |
#else | |
#define LOG(...); | |
#define LOG_METHOD; | |
#define LOG_PRINT(...); | |
#endif |
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
//MyObject.h | |
@interface NSObject (<# class #>Delegate) | |
- (void)<# classname #>DidFinish:(<# class #> *)controller; | |
@end | |
//MyObject.m | |
- (void)onCloseButton:(UIButton *)button | |
{ |
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
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | |
{ | |
return 10; | |
} | |
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
NSString *cellIdentifier = @"Cell"; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; | |
if(!cell){ |
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
<# controller #> *controller = [[[<# controller #> alloc] init] autorelease]; | |
controller.delegate = self; | |
UINavigationController* navController; | |
navController = [[UINavigationController alloc] initWithRootViewController:controller]; | |
navController.modalPresentationStyle = UIModalPresentationFormSheet; | |
[self presentModalViewController:navController animated: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
# Android SDKを落として | |
# ↓にパスを通す | |
# hogehoge/android-sdk-macosx/platform-tools | |
# hogehoge/android-sdk-macosx/tools | |
# | |
# <editor> ~/.bash_profile | |
# PATH = PATH:上のパス | |
# プロジェクトを作成 |
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
textField.autocapitalizationType = UITextAutocapitalizationTypeNone; | |
textField.autocorrectionType = UITextAutocorrectionTypeNo; |
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
UIImageWriteToSavedPhotosAlbum(image, self, nil, nil); |
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
function sendPushNotification() | |
{ | |
$deviceToken = '<64桁のデバイストークン>'; | |
// Push通知で表示するメッセージ | |
$alert = 'Push通知を送信しました'; | |
// Push通知受け取り時、アイコンに表示するバッジの数字 | |
$badge = 1; |
OlderNewer