Tag: ios7

如何设置UIImagePickerController的照片被查看/修改成一个自定义的UIViewController?

我正在使用默认的UIImagePickerController ,并立即拍摄照片后,显示以下默认屏幕: 我的问题是,我将如何能够使用我自己的自定义UIViewController来查看生成的图像 (并因此绕过此确认屏幕)。 请注意,对使用自定义相机控件或来自照片库的图像使用UIImagePicker的自定义叠加层不感兴趣,而只是跳过此屏幕,并假定拍摄的照片是用户所喜欢的。 谢谢!

iOS 7 – 禁用UITabBarItem色调的颜色

我有一个有五个图标的UITabBar,其中大部分是平的,只有一种颜色。 但是,其中一个button不应具有色调,因为它是公司的徽标,徽标具有各种不同的颜色。 我知道这是可能的,所以与UINavigationBar和UIToolbar(这是我使用的,这是一个可怕的解决方法)。 我做了一些沉重的search,并尝试了许多不同的解决scheme(我也想出了一些疯狂的解决scheme),但他们似乎没有为我工作iOS 7。有没有人有一个如何实现这个想法? 太感谢了!

在iOS 7中更改UIToolbar的高度

我试图改变我的UIToolbar在一个新的iOS 7项目的高度,但我无法。 我正在使用UINavigationController来pipe理几个UIViewController。 我试图通过导航控制器设置工具栏的框架,但唉,工具栏属性是只读的。 我看了一下“ 有没有办法改变UIToolbar的高度? ”,但没有奏效。 我试图UIToolbar子类,强制自定义高度,并在故事板中设置正确的类,但也没有工作,高度保持为44px。 我以为自动布局不能对工具栏的大小设置任何约束,每个字段都是禁用的。 我可以在一个比工具栏更高的UIBarButtonItem中设置自定义视图。 大项目将被正确渲染,但会从工具栏溢出。 这是我能做的最好的: 截图 实际上是否可以在iOS 7中更改UIToolbar的高度? 或者我应该创build一堆自定义项目来模仿它?

在ios7中,UITableViewCellAccessoryDe​​tailDisclosureButton分为两个不同的附件button

复选标记表示当时选中的行,左图是iOS7模拟器,右图是iOS6模拟器。 关注的是UITableViewCellAccessoryDetailDisclosureButton in iOS7 has two parts, one part with right arrow accessory and other is the clickable "i" button rather than iOS6. 这是一个标准的行为,或者我做错了什么,如果它是标准的,那么应该是在iOS7中处理UITableViewCellAccessoryDe​​tailDisclosureButton的正确方法?

应用程序显示安装与新的应用程序图标的新版本的应用程序后的旧版本的应用程序

我在iOS 7.1.1中遇到很奇怪的问题。 我有一个应用程序在1.0版本的苹果商店与2.0版本不同的应用程序图标。 现在我有不同的应用程序图标的同一个应用程序的2.0版本。 现在,如果我没有在设备上的1.0版本,下载2.0版本的应用程序,那么根本没有问题。 但是,如果我有旧版本1.0,我更新从iTunes的应用程序,然后我可以看到旧的应用程序图标是1.0而不是版本2.0。 当我打开应用程序,并通过按回家button最小化应用程序,它显示旧的应用程序图标为0.5秒,就像闪光灯,并replace为2.0版本的新图标。 此外,如果我删除该应用程序,并重新安装它,那么没有问题! 我不明白为什么它显示旧的应用程序图标? 我有iOS 7项目中的所有应用程序图标图像。 忘了提及应用程序版本1.0是由另一家软件公司开发的,我已经将1.0版本转移到我的开发人员帐户中,并且我使用所有新代码创build了2.0版本的相同应用程序,且没有旧的代码参考。 但我认为这是没有意义的,因为我有版本2.0的所有新的代码比版本1.0。 仍然与这个问题混淆。 任何指导/build议将有助于我。 谢谢

iOS 7的UITableView didSelectRowAtIndexPath pushViewController以编程方式,animation问题

编辑:我已经find了我自己的问题的答案。 请看我的post的底部。 我有一个animation的问题试图推动一个UITableView编程的didSelectRowAtIndexPath的UIViewController 。 当我在iOS 6中运行此代码时,它工作正常。 在iOS 7中,animation混乱了(它向左移动约20%的屏幕然后消失)。 如果我在故事板上做这个animation是好的。 我是否错过了一些东西或者有没有使用故事板的方法? // This is a cut down example. – (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UIViewController *viewController = [[UIViewController alloc] init]; [self.navigationController pushViewController:viewController animated:YES]; } 这就是在tableView消失之前的样子。 我明白为什么这样做。 这是因为推动新视图应该像使用情节提要一样滑动。 出于某种原因,它不能以编程方式工作。 编辑:这是我所有错过了由于某种原因,你必须设置一个backgroundColor。 – (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UIViewController *viewController = [[UIViewController alloc] init]; [viewController.view setBackgroundColor:[UIColor orangeColor]]; [self.navigationController pushViewController:viewController […]

iOS7崩溃 – [__NSPlaceholderDictionary initWithObjects

通过我的iOS6应用程序,并试图修复iOS7的一切。 在整个我的应用程序,我得到的错误: -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0] 这里是这个代码的堆栈跟踪: NSString *shareString = [NSString stringWithFormat:@"I … %@", self.booking.venue.name]; NSArray *activityItems = [NSArray arrayWithObjects:shareString, nil]; UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil]; [self presentViewController:activityViewController animated:YES completion:nil]; *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from […]

如果Cookies被禁用,则iOS7无法访问HTML5 localStorage

在iOS7上,尝试通过JavaScript访问HTML5 localStorage对象时,停止执行Javascript。 它在以前的iOS版本中正常工作。 应用程序刚刚安装并启动时,该应用程序运行完美。 但是,我closures了应用程序并重新启动,它不起作用,并且无法访问localStorage。 要禁用cookie,我使用了下面的代码: [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyNever]; 要访问localStorage,我使用了下面的代码: CGRect rect = self.view.frame; UIWebView* webView = [[UIWebView alloc] initWithFrame:rect]; [self.view addSubview:webView]; [webView loadHTMLString:@"<script>alert('hello world');alert(localStorage);</script>" baseURL:nil] 我已经通过iOS7文档,但无法find任何有关此问题的更新。 有人也遇到过吗? 请分享有关这方面的任何信息,将是非常有益的。 任何解决方法? 谢谢

神秘的警告没有任何谷歌的结果

我在iOS项目中得到了这个警告:(iOS7,XCode 5 GM) 警告:无法创build恢复正在进行的标记文件 我正在开发一个视图控制器,当我得到这个警告启动时变黑。 删除应用程序并重新启动XCode有时似乎有所帮助。 我两个都没有返回 -(BOOL)application:(UIApplication *)application shouldRestoreApplicationState: -(BOOL)application:(UIApplication *)application shouldSaveApplicationState: Update1:​​我在iPhone4上testing。 同样的结果。 警告和我的视图控制器上的黑屏。 Update2:回答我自己的黑屏问题。 这个警告在最新的iOS 7.0.x版本中消失了。

iOS 7:如何设置UIBarButtonItem backButtonImage为UIControlStateHighlighted?

我正在尝试在正常和突出显示的状态下为后退button设置背景图像。 – (void)configureBackButtonInNavigationItem:(UINavigationItem *)item { UIBarButtonItem *backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"back" style:UIBarButtonItemStyleBordered target:nil action:NULL]; [backBarButtonItem setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]} forState:UIControlStateNormal]; [backBarButtonItem setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor orangeColor]} forState:UIControlStateHighlighted]; // white arrow image UIImage *normalImage = [[[UIImage imageNamed:@"btn_normal"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] resizableImageWithCapInsets:UIEdgeInsetsMake(0.f, 17.f, 0.f, 0.f)]; // orange arrow image UIImage *pressedImage = [[[UIImage imageNamed:@"btn_on_press"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] resizableImageWithCapInsets:UIEdgeInsetsMake(0.f, 17.f, 0.f, 0.f)]; [backBarButtonItem […]