Tag: ipad

应用程序错误尝试以模态方式呈现分割视图控制器

我正在使用故事板,我想加载一组特定的XIB,问题是我得到这个错误: 'NSInvalidArgumentException', reason: 'Application tried to present a Split View Controllers modally <PlaceHolderViewController: 0x38e890> 在PlaceHolderViewController我有一个button来加载xib这个代码,我没有问题从iPhone加载xib,但在iPad上我有这个问题。 这是代码: – (IBAction)actionButtonConversor:(id)sender { ConverterViewController *converterViewController; UnitSelectViewController *unitSelectViewController; if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { converterViewController = [[ConverterViewController alloc] initWithNibName:@"ConverterViewController_iPhone" bundle:nil]; unitSelectViewController= [[UnitSelectViewController alloc] initWithNibName:@"UnitSelectViewController_iPhone" bundle:nil]; self.navigationController = [[UINavigationController alloc] initWithRootViewController:converterViewController]; self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.0f green:0.48235297203063965f blue:0.63137257099151611f alpha:1]; [self presentModalViewController:self.navigationController […]

访问UIDatePicker时EXC_BAD_ACCESS

我想从我的DatePicker中读取值并将其存储在我的单例中,但在尝试执行此操作时遇到exception。 这里是单例界面: @interface Helper : NSObject { NSMutableArray *array; //Information For Filter page NSMutableArray *towns; NSMutableArray *types; //Shared resources to apply filters NSDate *toDate; NSDate *fromDate; NSString *selectedType; NSString *selectedTown; //Shared resource of which button was clicked int clicked; int clickedCell; int clickedContext; } @property (nonatomic, retain) NSMutableArray *array; @property (nonatomic, retain) NSMutableArray *towns; @property […]

如何保存PDF文件在iPhone的内存,并使其可以通过使用titanium的PDF文件开jar器应用程序访问

我是新的titaniumtitanium在我的应用程序,我需要下载和保存在iOS使用titanium的PDF文件和下载的文件可以通过第三方PDF查看器应用程序访问。任何帮助,以提前实现这一点。

在iOS上,为什么shouldAutorotateToInterfaceOrientation调用了10,12或13次?

如果为iPad创build单一视图应用程序,根据为plist设置支持的设备方向,以及shouldAutorotateToInterfaceOrientation返回的值, shouldAutorotateToInterfaceOrientation可以调用10,12或甚至13次。 一个简单的例子是,如果“Support Device Orientation”设置为“Landscape Left”,并且shouldAutorotateToInterfaceOrientation也仅对Landscape Left返回YES ,那么如果我以Landscape Left方向启动应用程序,那么shouldAutorotateToInterfaceOrientation将连续调用12次。 如果我拿着它在其他方向,并启动应用程序,那么它是13倍。 连续几次被称为什么原因?

使用Google地图API在100个半径范围内使用相同产品的人的GPS位置

是否有可能find使用谷歌地图API在iOS应用程序的特定半径使用同一产品的人民的GPS位置?

在Storyboard中创build的TabbarController不能以编程方式更改视图

创build一个tabbarcontroller作为splitview控制器的详细视图。 我可以通过在模拟器上单击item1 , item2图标来更改视图,但不能以编程方式更改视图。 尝试在nslog打印viewcontrollers时,我得到null 。 在MasterView中: @property (strong, nonatomic) TabBarRootViewController *detailViewController; – (void)viewDidLoad { [super viewDidLoad]; self.detailViewController=[[TabBarRootViewController alloc] init]; //tried also self.detailViewController = (TabBarRootViewController *)[self.splitViewController.viewControllers objectAtIndex:1]; } – (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //this sends object info to detail if (indexPath.section==0) { //send row number NSNumber *i = [NSNumber numberWithInteger:indexPath.row]; NSLog(@"Selected index %@",i); self.detailViewController.detailItem […]

iPhone和iPad的同样的应用程序,但不是通用?

我为iPhone设备开发了一个应用程序,我也想为iPad设备编写应用程序。 我不想创build一个通用应用程序。 我希望每个types在appstore中被视为不同的应用程序。 我正在使用xcode 4 任何人都可以指导我一个很好的文档/教程,因为我没有find很多关于这个问题。 我应该创build一个新的项目吗? 我可以使用现有的代码吗? 谢谢

如何在导航到不同的视图控制器并返回到第一个视图控制器时保留UITextField文本?

我有一个在我的第一个视图中有3个文本框的login页面,当我导航到不同的视图,并返回到我的第一个视图(即我login应用程序,然后注销)。我想我的2文本框保留其价值和我应该可以再次login。 任何人都可以帮助请。

如何从目标c中的静态方法调用非静态方法?

我有一个类,我正在使用单例模式。我有静态方法。现在我想调用静态方法内的非静态方法,但我无法调用它。请告诉我什么是解决scheme。 #import "ThemeManager.h" @implementation ThemeManager +(ThemeManager *)sharedInstance { NSLog(@"shared instance called"); static ThemeManager *sharedInstance = nil; if (sharedInstance == nil) { sharedInstance = [[ThemeManager alloc] init]; } [self getPref];//i get error at this line return sharedInstance; } -(void)getPref { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSString *themeName = [defaults objectForKey:@"theme"] ?: @"default"; NSLog(@"theme name is %@",themeName); […]

NSPredicate与AND和OR问题

我有以下NSPredicate: fetchRequest.predicate = [NSPredicate predicateWithFormat:@"url = %@ AND type = %@ OR type = %@", newsStory.url, [NSNumber numberWithInt:StoryHighlighted], [NSNumber numberWithInt:StorySavedAndHighlighted]]; 我想用这个特定的URL和types(突出显示或突出显示并保存)获取故事。 但是,上面的查询似乎并没有工作。 我究竟做错了什么?