ios8

device.newDefaultLibrary() returns nil

。_饼干妹妹 提交于 2020-01-07 06:25:25
问题 After I installed XCode 6 GM, application, compiled by it started to return nil at Metal Framework device.newDefaultLibrary() call. What's the problem? 回答1: Update your device to iOS 8 GM and it will stop failing. 回答2: Try use - (nullable id )newDefaultLibraryWithBundle:(NSBundle *)bundle error:(__autoreleasing NSError **)error 来源: https://stackoverflow.com/questions/25757157/device-newdefaultlibrary-returns-nil

device.newDefaultLibrary() returns nil

天涯浪子 提交于 2020-01-07 06:25:07
问题 After I installed XCode 6 GM, application, compiled by it started to return nil at Metal Framework device.newDefaultLibrary() call. What's the problem? 回答1: Update your device to iOS 8 GM and it will stop failing. 回答2: Try use - (nullable id )newDefaultLibraryWithBundle:(NSBundle *)bundle error:(__autoreleasing NSError **)error 来源: https://stackoverflow.com/questions/25757157/device-newdefaultlibrary-returns-nil

UISplitViewController with new UISearchController issue with UISearchBar

∥☆過路亽.° 提交于 2020-01-07 04:01:50
问题 I recently started to rewrite my iOS app to use the new UISearchController and a universal storyboard. My app is available for both devices ( iPhone and iPad ) so the change to the universal storyboard using the UISplitViewController was a big advantage. But sadly the UISearchController isn't working as expected. I added the UISearchController with the following lines: self.searchController = UISearchController(searchResultsController: nil) self.searchController.searchBar.sizeToFit() self

NSString sizeWithAttributes: returns different height in iOS 8 versus iOS 7

僤鯓⒐⒋嵵緔 提交于 2020-01-06 20:36:33
问题 The line below returns a size with a larger height when I run it on an iOS8 device versus iOS7. It happens regardless of whether I'm building with iOS 7 or iOS 8 as my base SDK. Anyone else seeing this issue? return [myString sizeWithAttributes:attributes]; 回答1: I answered my own question. The issue occurs when the string ends in a line break as below. This causes an issue because iOS 7 ignores trailing line breaks but iOS 8 doesn't. myString = @"Some text.\n"; Removing the trailing line

Change UIActionSheet buttons background color and button font

左心房为你撑大大i 提交于 2020-01-06 19:30:32
问题 I have a UIActionSheet in my application. I want to change the background color of actionsheet buttons and the font of the buttons. I made a search found below code: for (UIView *_currentView in actionSheet.subviews) { if ([_currentView isKindOfClass:[UIButton class]]) { //DO YOUR WORK } } but this code is not working on ios 8. for ios I found below code too: [[UIView appearanceWhenContainedIn:[UIAlertController class], nil] setTintColor:[UIColor redColor]]; but this code only changes the

Change UIActionSheet buttons background color and button font

允我心安 提交于 2020-01-06 19:29:06
问题 I have a UIActionSheet in my application. I want to change the background color of actionsheet buttons and the font of the buttons. I made a search found below code: for (UIView *_currentView in actionSheet.subviews) { if ([_currentView isKindOfClass:[UIButton class]]) { //DO YOUR WORK } } but this code is not working on ios 8. for ios I found below code too: [[UIView appearanceWhenContainedIn:[UIAlertController class], nil] setTintColor:[UIColor redColor]]; but this code only changes the

iOS 8 Extension: how to use xib inside Cocoa Touch Framework in extensions?

廉价感情. 提交于 2020-01-06 18:53:56
问题 I'm creating an iOS 8 extension(Action extension in specific), I have some user interfaces that are both used in extension and my container app, so that I want to put those view controllers with their xibs inside my Cocoa Touch Library, so that I can share them between my app and extension. But to my surprise, those xibs are neither in container app's bundle nor are they in my extension's bundle, so that neither of my app or extension can read those xibs. What should I do to achieve this? 回答1

UIAlertView keyboard overlay textview issue

回眸只為那壹抹淺笑 提交于 2020-01-06 14:48:24
问题 I have found this code: CGAffineTransform myTransform = CGAffineTransformMakeTranslation(0.0, 130.0); [myAlertView setTransform:myTransform]; But seems it want move up my alert to the top. How can I move up alert view to the top? Set frame does not help as well. alerView.frame = rect; 回答1: You can't, if you're using a UIAlertView . From the apple docs: Appearance of Alert Views You cannot customize the appearance of alert views. else where.... Subclassing Notes The UIAlertView class is

CSS transitions do not work on iPad after sleep/resume when run from homescreen

元气小坏坏 提交于 2020-01-06 14:12:15
问题 I recently asked this question about jQuery animation not working on iPad after sleep/resume when run from a homescreen icon. That question received zero comments and zero answers in the two weeks since I asked it. I spent some more time investigating, creating small tests to understand what works and what doesn't - and confirmed that jQuery is not at fault here, but rather the mobile Safari. I created this simple test: http://jsfiddle.net/87r3vfe1/ - which does not use jQuery at all and

Delete in PhotoKit: can you skip “Recently Deleted”?

…衆ロ難τιáo~ 提交于 2020-01-06 14:11:43
问题 As of iOS8, when you delete a photo, it goes into a trashcan-analog called "Recently Deleted". This happens when you delete via Photos.app, or via the PhotoKit API (using PHAssetChangeRequest.deleteAssets() ). In Photos.app, you can then go into "Recently Deleted", and really delete that photo. Is there a way to do that in PhotoKit? 回答1: Nope. The only deletion API is deleteAssets . 来源: https://stackoverflow.com/questions/29885416/how-to-remove-photos-from-ios-camera-roll