By using mkdir, it is a atomic lock.
Lock your script (against parallel run)
2012年3月29日 星期四
2012年3月23日 星期五
2012年3月22日 星期四
2012年3月20日 星期二
2012年3月11日 星期日
[iOS] UIAlertView
UIAlert View with multiple options.
in .h: include UIAlertViewDelegate
in .m: implement delegate for UIAlertViewDelegate
in .h: include UIAlertViewDelegate
@interface MyController : UIViewController <UIAlertViewDelegate> {
}
in .m: implement delegate for UIAlertViewDelegate
#pragma UIAlertView
- (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
NSLog(@"%d", buttonIndex);
[iOS] UIActionSheet
UIActionSheet Class Reference
Move Cancel Button from top to bottom
In .h: include UIAlertViewDelegate
In .m: implement delegates
Move Cancel Button from top to bottom
In .h: include UIAlertViewDelegate
@interface MyController : UIViewController <UIAlertViewDelegate> {
}
In .m: implement delegates
- (void) ShowActionSheet:(NSString *)title {
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:title
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles: nil];
[actionSheet addButtonWithTitle:@"Option 1"];
[actionSheet addButtonWithTitle:@"Option 2"];
[actionSheet addButtonWithTitle:@"Option 3"];
[actionSheet addButtonWithTitle:@"Cancel"];
actionSheet.cancelButtonIndex = actionSheet.numberOfButtons;
[actionSheet showInView:self.view];
[actionSheet release];
}
- (void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
NSLog(@"title=%@, buttonIndex: %d, cancelButtonIndex: %d, firstOtherButtonIndex: %d",
actionSheet.title,
buttonIndex,
actionSheet.cancelButtonIndex,
actionSheet.firstOtherButtonIndex);
}
2012年3月10日 星期六
2012年3月9日 星期五
[iOS] Apple Certification Expired
When your Apple certification is expired, you have to remove it and request a new cert as well as provision profiles. Here is the solution for this issue.
Code Sign Errors: profile doesn’t match any valid certificate/private key pair in the default keychain
訂閱:
文章 (Atom)