Tag: ios6

UIImage UIToolbarbutton不完全透明

我已经有了这个代码永远,它曾经工作,但它开始展示一个恼人的行为,我认为,iOS 6。有几个类似的线程上,所以我还没有find一个解决scheme,我很舒服到目前为止。 我find了一个解决方法(见下面),但它似乎不是“正确”的方式来做到这一点。 这是一个问题相同的线程,但没有答案。 当我使用图像作为UIBarButtonItem并将其放入UIToolbar , UIToolbar的包含矩形不完全透明。 我用于UIBarButtonItem的PNG图像是透明的,所以这不是问题。 这里是一个例子: 当我使用文本而不是图像作为UIBarButtonItem ,透明度按预期工作。 如此: 这是自永远起作用的代码: NSMutableArray *buttonItems = [[[NSMutableArray alloc] initWithCapacity: 1] autorelease]; UIImage *printButtonImage = [UIImage imageNamed:@"buttonPrint.png"]; UIToolbar *toolBarButtons = [[[UIToolbar alloc] initWithFrame:CGRectMake( 0, 0, 52.0, 44.01 )] autorelease]; UIBarButtonItem *printButton = [[[UIBarButtonItem alloc] initWithImage:printButtonImage style:UIBarButtonItemStyleBordered target:self action:@selector(printDocument:)] autorelease]; [buttonItems addObject:printButton]; [toolBarButtons setItems:buttonItems animated:YES]; self.navigationItem.rightBarButtonItem = […]

我已经整合了谷歌加在我的IOS应用程序,但我无法获得当前login的用户的电子邮件ID

我已经在我的iOS应用程序中集成了google plus,我可以成功login,但是我无法获取当前login的用户的电子邮件地址。我已经参考了https://developers.google.com/+/手机/ ios /并遵循所有必要的步骤login! 那么,我如何获得当前的用户邮件ID是在谷歌加login?

显示UIPickerView就像键盘一样,没有UITextField

我正在寻找一种方式来展示一个UIPickerView当用户点击一个UIBarButtonItem 。 设想一下表格视图结果的filter。 我知道我可以使用UITextField inputView,但事实并非如此 – 我只有一个UIBarButtonItem和一个UITableView 。 我已经看到使用UIActionSheet ,但它看起来不自然,特别是当它animation显示。 将UIView手动启动和closures屏幕手动唯一的select? 该应用程序是仅iOS 6和iPhone,所以我不需要保持兼容性的任何其他版本/成语。

iOS 7应用程序崩溃EXC_CRASH(SIGABRT)objc_exception_throw在iOS 6上正常工作

我们的应用程序在iOS 7中崩溃,它在iOS 6中工作正常。我们不确定是什么导致了这个问题。 我们可以看到抛出了一些exception,但是我们不确定代码在哪里造成的。 这是崩溃报告: Incident Identifier: 1F589930-15BD-49F7-80E6-831A95092FDF CrashReporter Key: aaa79870161ff1e371394b881a26e97f0066f464 Hardware Model: iPhone5,2 Process: myapp [1492] Path: /var/mobile/Applications/A121DF2F-A7B9-4DD9-9FBC-BB06CD7C5EF5/myapp.app/myapp Identifier: co.uk.myapp Version: 1.0 (0.9) Code Type: ARM (Native) Parent Process: launchd [1] Date/Time: 2013-10-01 14:59:17.555 +0530 OS Version: iOS 7.0 (11A465) Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Triggered by Thread: […]

使用另一个UINavigationController推送视图控制器

这是我的应用程序的样子。 我已经分类了UINavigationController的方式,当你点击一个类似于导航栏的buttonMenuViewController滑出。 我怎样才能把我的VC1,VC2,VC3中的一个从UITableViewController菜单中的didSelectRow放到ContentViewController中? – > SlidingViewController / \ 容器容器 | | MenuViewController ContentViewController | | UITableViewController SubClassed UINavigationController | | | | VC1 VC2 VC3 VC4 通常我做类似下面的代码,但与上面的情况我不知道如何我可以推新视图控制器,如果我不在同一个UINavigationController。 NSString * storyboardName = @"MainStoryboard_iPhone"; NSString * viewControllerID = @"ViewID"; UIStoryboard * storyboard = [UIStoryboard storyboardWithName:storyboardName bundle:nil]; MyViewController * controller = (MyViewController *)[storyboard instantiateViewControllerWithIdentifier:viewControllerID]; [? presentViewController:controller animated:YES completion:nil]; […]

iOS 6 UISegmentedControl与iOS 7devise

我正在开发一个应用程序,它应该可以在iOS 6和iOS 7上运行,并且具有相同的平面devise。 我试图自定义我的UISegmentedControl有边界,圆angular半径和所有,但我无法弄清楚如何做到这一点。 到目前为止,我只有一个平坦的背景。 有没有人有任何build议有一个iOS 6 UISegmentedControl看起来像一个iOS 7吗? 编辑: 我想拥有 代替

coreplot酒吧轻拍不工作

我已经从Github上下载了这个代码: https : //github.com/gilthonweapps/CorePlotBarChartExample。如何获得onTap的select吧? 我正在使用下面的代码: #pragma mark – CPTBarPlotDelegate methods -(void)barPlot:(CPTBarPlot *)plot barWasSelectedAtRecordIndex:(NSUInteger)index { NSLog(@"barWasSelectedAtRecordIndex %d", index); } 但是这不起作用(它不认识Tap)。请帮助。 预先感谢和新年快乐。

NSLineBreakMode枚举和向后兼容性

我需要我的应用程序来支持iOS 5 +。 由于之前的iOS 6中, UILabel中的UILineBreakMode是UILineBreakModetypes的,并且它是iOS 6+的NSLineBreakModetypes,所以应该最好(或更正确)检查当前运行的iOS版本以确定types被使用? 直接做[[UIDevice currentDevice] systemVersion]是否正确,还是有更好的方法? 谢谢!

即使被告知不要,iOS6方向仍在旋转

我似乎有我的iOS应用程序的困难。 它的部署目标是iOS5.0,但是我正在使用iOS 6.0 SDK。 在我的视图控制器中,我有: -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } – (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { return UIInterfaceOrientationMaskPortrait; } -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return (toInterfaceOrientation == UIInterfaceOrientationPortrait); } 这在iOS5模拟器中运行时工作正常。 该视图不会旋转到LandScape或颠倒。 但是,在IOS6模拟器(和设备上),它将继续旋转。 我已经使用NSLog来检查-supportedInterfaceOrientations是否被调用,它有两次,但它仍然旋转到LandScape(右或左) 我究竟做错了什么? 我还扩展了UINavigationController (我的根视图控制器)来包含这个: @implementation UINavigationController (Rotation_IOS6) -(BOOL)shouldAutorotate { return [[self.viewControllers lastObject] shouldAutorotate]; } -(NSUInteger)supportedInterfaceOrientations { return [[self.viewControllers lastObject] supportedInterfaceOrientations]; } – (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { return [[self.viewControllers lastObject] preferredInterfaceOrientationForPresentation]; } […]

Parse.com和Facebooklogin,运行无限循环

我更新了parsing和Facebook iOS SDK到最新版本,当我尝试login使用Facebook我的应用程序崩溃,从debugging器,我可以看到,它是在无尽的循环调用3-4方法。 我的login代码如下所示: – (void)openSession { UIViewController *topViewController = self.window.rootViewController; NSArray *permissions = [NSArray arrayWithObjects:@"user_likes", @"friends_likes", nil]; // Login PFUser using Facebook [PFFacebookUtils logInWithPermissions:permissions block:^(PFUser *user, NSError *error) { if (!user) { if (!error) { NSLog(@"Uh oh. The user cancelled the Facebook login."); } else { NSLog(@"Uh oh. An error occurred: %@", error); } […]