我将我的Xcode更新为8.2,从那时起,如果我尝试在调试时截取屏幕截图,则会崩溃,然后退出.
我尝试过iOS 9.0和10.0模拟器,它们都发生在它们身上.
谢谢
更新:
8.2.1 - 不起作用
8.3 - 仅适用于Mac OS Sierra
我想在用户按任何键盘键时检测到.
任何只在键入任何字符时调用的方法,而不是在显示键盘时调用的方法.
谢谢!!
我在我的应用程序中实现了Tab栏控制器.但我的第一页是登录视图.所以,我不想在它上面显示标签栏.我通过隐藏该视图上的标签栏来完成此操作.
但是现在,当我选择第一个选项卡时,它总是作为登录页面进入根视图控制器.
//for home tab..
UINavigationController *nav1 = [[UINavigationController alloc] init];
UIViewController *viewController1;
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
viewController1 = [[[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil] autorelease];
} else
{
viewController1 = [[[LoginViewController alloc] initWithNibName:@"LoginViewController_iPad" bundle:nil] autorelease];
}
nav1.viewControllers = [NSArray arrayWithObjects:viewController1, nil];
//for account tab...
UINavigationController *nav2 = [[UINavigationController alloc] init];
UIViewController *viewController2;
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
viewController2 = [[[AccountView alloc] initWithNibName:@"AccountView_iPhone" bundle:nil] autorelease];
} else
{
viewController2 = [[[AccountView alloc] initWithNibName:@"AccountView_iPad" bundle:nil] autorelease];
}
nav2.viewControllers …Run Code Online (Sandbox Code Playgroud) 在我的应用程序中,我使用了sqlite DB.我将应用程序的1.0版本提交到了应用程序商店.但之后我对DB进行了一些更改,比如插入一些新行.
然后提交了1.1版本的应用程序. But i will not able to get updated DB because the old DB already exists in device.
我怎么解决这个问题?
如果我删除应用程序然后安装新版本的应用程序,那么我得到了更新的数据库.
//My code for copy of DB is as follow:
- (void)createEditableCopyOfDatabaseIfNeeded
{
// First, test for existence.
BOOL success;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *writableDBPath = [documentsDirectory stringByAppendingPathComponent:@"xxx.sqlite"];
success = [fileManager fileExistsAtPath:writableDBPath];
if (success) return;
// The writable database does not exist, so copy …Run Code Online (Sandbox Code Playgroud) 我已经成功集成了Admob SDK.
现在我还想在我的项目中实现inmobi和Millennial Media广告.
我知道可以通过Admob Mediation控制inmobi和Millennial Media广告.
但要展示inmobi和Millennial Media广告,我是否必须单独集成他们的SDK,或者我可以使用Admob Mediation显示这些广告?
请建议.
谢谢.