ios8

How to make custom transition for iOS7 that are compatible with iOS8?

与世无争的帅哥 提交于 2019-12-14 02:39:57
问题 I want to create a custom transition for my view controllers. I have begun to gather some information about the new API introduced in iOS7 . But I have been told that this API somehow changed in iOS8 . The video 214 of WWDC 2014 tackles this point. And some people told me that the custom transitions they created for iOS7 don't work properly on iOS8 (see for instance here and also there). So my question: Could you give some general advice, a guideline, for creating a custom transition that has

Get serial number of device on iOS 8

和自甴很熟 提交于 2019-12-14 00:20:44
问题 For an in-house application, we were using the following code UIDevice+serialNumber to get the device serial number. However, it seems that with iOS 8, the registry key "IOPlatformSerialNumber" is empty. Can the serial number be obtained any other way? 回答1: Answer: No. There are currently floating solutions around abusing the .mobileconfig, but they add other problems due their nature. UUID was removed for a reason. See the news around privacy and the summon of Apple by the US Senat from 2011

How to change the status bar bgcolor for UITableView with hidden nav bar?

半城伤御伤魂 提交于 2019-12-13 19:15:39
问题 The UITableView is inside NavigationController, but navigation bar hidden by this line: [[self navigationController] setNavigationBarHidden:YES animated:YES]; What I have: What I want: What I've tried: How to change Status Bar text color in iOS 7: tried the 1 & 2nd steps, didn't work. (the 3rd step would make all text in status bar white) modify the frame of the 1st cell in: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath: // for the 1st

Disable Rotation of UIViewController in iOS 8

时间秒杀一切 提交于 2019-12-13 18:26:51
问题 I want to disable rotating only one viewController in my Application in iOS 8. I try with some older methods but it is not working or deprecated in iOS 8. I try this new method of Rotation in iOS 8. - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator but i don't know how to disable the rotation in this method. I want only Landscape mode in this viewController. I checked other SO question but my code still not working

iOS 8 Swift sending user directly to location services from an Alert dialog

放肆的年华 提交于 2019-12-13 18:23:35
问题 When a user has location services turned off, I want to prompt to turn them on with a UIAlertController. One of the options in the Alert Controller should take them directly to location services (for the OS, not the app). Right now, I've gotten as far as being able to send the user to permissions for my specific app, but not for the overall OS location settings. Is there a way to send the user directly to the OS Location settings from the UIAlertController? Here is the current code (located

Can you get a UITableView's intrinsic content size to update based on the number of rows shown if scrolling is disabled?

拈花ヽ惹草 提交于 2019-12-13 15:27:16
问题 We have a portion of our UI which is a small list of labels with color swatches next to them. The design I'm taking over has six of these hard-coded in the layout even though the actual data is dynamic, meaning if we only need to show three, we have to explicitly hide three, which also throws off the balance of the page. Making matters worse is each one of those 'items' is actually made up of several sub-views so a screen with six hard-coded items has eighteen IBOutlets. What I'm trying to do

How to add UITableview in UIAlertController in iOS8?

陌路散爱 提交于 2019-12-13 15:00:34
问题 Till iOS7 in Custom view we can put tableview in alert as per below picture. But in iOS8 UITableview is not working. I can put it in tableview but the tableview is not scrolling and not detecting any click on any cell. So, how do I implement this type of AlertController ? 回答1: Please try below code with custom view and animations Test.h #import <UIKit/UIKit.h> @interface Test : UIView <UITableViewDataSource,UITableViewDelegate> { UITableView *table; } - (id)initWithFrame:(CGRect)frame Array:

Getting pixel data on iOS 8 / iPhone 6

大城市里の小女人 提交于 2019-12-13 14:13:29
问题 I need to retrieve the pixel data for a given (x, y) coordinate of a bitmap image. For years my code has been as follows: _palettePixelData = CGDataProviderCopyData(CGImageGetDataProvider(image.CGImage)); const UInt8 *rawData = CFDataGetBytePtr(_imagePixelData); int pixelInfo = ((image.size.width * floorf(pointInImage.y) * image.scale) + floorf(pointInImage.x) * image.scale ) * 4; CGFloat red = rawData[pixelInfo + 0] / 255.0; CGFloat green = rawData[pixelInfo + 1] / 255.0; CGFloat blue =

Error using += to append a Character to a String: String is not identical to UInt8

狂风中的少年 提交于 2019-12-13 14:09:44
问题 When trying to use the += operator to append a Character to a String , I'm getting the following error: String is not identical to UInt8 The error occurs on the puzzleOutput += char line in the code below: let puzzleInput = "great minds think alike " var puzzleOutput = "" for char in puzzleInput { switch char { case "a","e","i","o","u": continue default: puzzleOutput += char } } println(puzzleOutput) How can I append a Charater to a String ? 回答1: The use of += to append a Character to a

dismissViewControllerAnimated crash in iOS8

不羁的心 提交于 2019-12-13 13:27:01
问题 I have a application that work very well in iOS7.0/7.1 Since the last iOS update (8.0) the dismissViewControllerAnimated crash every time. Someone saw the same thing ? I have a control this to call the second controller: **detailViewController.delegate = self; [self presentViewController:detailViewController animated:YES completion:nil];** and in the close button I use this: **// Do something with the sender if needed [viewController dismissViewControllerAnimated:YES completion:NULL];** I