一行ですむので分かりやすい。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad || interfaceOrientation == UIInterfaceOrientationPortrait);
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad || interfaceOrientation == UIInterfaceOrientationPortrait);
}
"an error occurred uploading to the itunes store"
"an error occurred uploading to the itunes store"
- (void)setViewsInMainVC:(UIInterfaceOrientation)orientation{
CGSize naviBarSize = self.navigationController.navigationBar.frame.size;
CGSize toolBarSize = self.toolBar.frame.size;
if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) {
mapview.frame = CGRectMake(0, toolBarSize.height, 768, 1024 - naviBarSize.height - toolBarSize.height);
toolBar.frame = CGRectMake(toolBar.frame.origin.x,toolBar.frame.origin.y,768,toolBarSize.height);
}else {
mapview.frame = CGRectMake(0, toolBarSize.height, 704, 768 - naviBarSize.height - toolBarSize.height);
toolBar.frame = CGRectMake(toolBar.frame.origin.x,toolBar.frame.origin.y,704,toolBarSize.height);
}
}
- (IBAction)presentRoutePopoverVC:(id)sender{
//既にポップオーバーが表示されている場合は消す
if (popover.popoverVisible) {
[popover dismissPopoverAnimated:YES];
//ポップオーバーが表示されていない場合は表示する
}else {
popover.popoverContentSize = CGSizeMake(320, 750);
[popover presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
}
}
NSRange range = [textField.text rangeOfString:@"3[0-9]{1}.[0-9]+,13[0-9]{1}.[0-9]+" options:NSRegularExpressionSearch];
if (range.location != NSNotFound) {
NSString *locStr = [startTF.text substringWithRange:range];
//(.....以下省略.....)
}
Cocoa/Android/PHP/JQUERY/MYSQL/XMLなど開発日記とか開発してない日記とか。