ios9

Xib file: Can't drag a View from a xib file to a swift file

主宰稳场 提交于 2019-12-04 17:11:46
I just dragged and dropped a View to a xib file. I added some constrains and tried to Ctrl drag from the View to a .swift file with the assistant editor, but it bounce back, what am I missing? The xib file needs to be a subclass of the file you are trying to ctrl+drag to. I was setting the View's custom class instead of the File's Owner. Once I set the File's Owner to the custom class, I was able to control-drag from the view in the storyboard over to my class. Hope this helps someone. 来源: https://stackoverflow.com/questions/32671642/xib-file-cant-drag-a-view-from-a-xib-file-to-a-swift-file

UIScreen mainScreen in Xcode 8

坚强是说给别人听的谎言 提交于 2019-12-04 16:52:35
We have a problem with iOS SDK in Xcode 8. We use method [UIScreen mainScreen] in our project. This method is available from iOS 2.0. But when we built product in Xcode 8 and submited it for review, app was rejected. Surprise: in the new SDK ( Xcode 8 GM ) this method marked as “ available from iOS 10.0 ”. In other words - now iOS 9 identifies [UIScreen mainScreen] as “ non-public API ”. Perhaps this is Apple’s bug. Our question: 1) We want to continue using this method. 2) We want to support iOS 8 and iOS 9. 3) We want to use Xcode 8. Is that possible? Class properties are an Objective-C

Over the air app installation is stopped working on iOS 9

你。 提交于 2019-12-04 14:11:08
I have upgraded my device with iOS 9. I am manually generating plist and ipa file but suddenly it stopped installing in ios 9 while it was working fine with iOS 8. below items assets <dict> <key>kind</key> <string>software-package</string> <key>url</key> <string>https://www.eg.com/urland.ipa</string> </dict> <dict> <key>kind</key> <string>full-size-image</string> <key>needs-shine</key> <true/> <key>url</key> <string>https://www.eg.com/imageurl/iTunesArtwork.png</string> </dict> <dict> <key>kind</key> <string>display-image</string> <key>needs-shine</key> <true/> <key>url</key> <string>https:/

Splash screen animation is not supporting with Xcode 7 GM(iOS9). App crashes with an error

◇◆丶佛笑我妖孽 提交于 2019-12-04 13:31:45
问题 In my application i am using the below code to show an animated splash screen. App working fine in Xcode-6.4(iOS 8), but coming to Xcode-7GM version(iOS9) app crashes with an error. window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; imageArray = [[NSMutableArray alloc] initWithCapacity:IMAGE_COUNT]; // Build array of images, cycling through image names for (int i = 1; i <= IMAGE_COUNT; i++) [imageArray addObject:[UIImage imageNamed: [NSString stringWithFormat:@"image__

ios 9 and NSAppTransportSecurity

China☆狼群 提交于 2019-12-04 13:27:55
问题 There is a problem with iOS 9 and work with the server. I info.plist set: <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict> When you run the application through Xcode, everything is fine. Work with the server takes place perfectly. But as soon as I stop the application and try to run it by simply clicking on the icon in the simulator. The network stops working. The same problem when I send the application to the Review in TestFlight. The application is

Base64 Encoding/Decoding with Swift 2

跟風遠走 提交于 2019-12-04 12:35:12
问题 My code was working well on Xcode 6.4 with Swift 1.2: var imageData = UIImageJPEGRepresentation(firstImageView.image!, 0.2) let base64String = imageData!.base64EncodedStringWithOptions(.allZeros) Once I moved to Xcode 7 and Swift 2 the following error appeared: type of expression is ambiguous without more context So I tried: let base64String = imageData!.base64EncodedStringWithOptions(options: NSDataBase64EncodingOptions.allZeros) But there is no "allZeros" option among

Permission to take photo OR get image from library not shown in iOS9 (Xcode 7beta, Swift2)

筅森魡賤 提交于 2019-12-04 12:28:49
问题 The code below shows an example for my access to the image lib. No matter where I call the code (view) I do not see the permission dialog from the phone popping up and therefore cannot allow my app to access either camera or library. Also, the privacy settings do not show my app either. Any thoughts? I'm going nuts. let imgPicker = UIImagePickerController() imgPicker.sourceType = UIImagePickerControllerSourceType.PhotoLibrary imgPicker.modalPresentationStyle = UIModalPresentationStyle.Popover

AVPlayer not playing audio - iOS 9, Objective - C

蓝咒 提交于 2019-12-04 11:35:26
问题 I am trying to play audio from a URL in my app. Everything happens as expected in iOS 8 (simulator and physical devices). For iOS 9, it works in simulator but on device, the audio simply does not play. The streaming appears, if I click on play, the progress bar also shows that audio is getting loaded and playing but the sound does not come. This issue is happening in iOS 9 physical device. It works totally fine with iOS 8 physical device. I created a simple button. On clicking on button, the

IOS Simulator: Simulator user has requested new graphics quality: 100

大兔子大兔子 提交于 2019-12-04 11:09:34
问题 When I run an iOS application in the iOS 9.0 simulator I am getting the following warning message. Warning message : "Simulator user has requested new graphics quality: 100" Has anyone seen this error before? Have you been able to solve it? What did you do to fix it? 回答1: You can ignore this error if you want to; it's nothing to do with your code, it's just Apple's logging code pointing out that you have enabled a particular setting. If you desperately want it gone, open the Simulator on your

Alternative to UIAlertView for iOS 9?

不打扰是莪最后的温柔 提交于 2019-12-04 10:11:58
问题 UAlertView is deprecated in iOS 9 and later. What would be an alternative? UIAlertView *new = [[UIAlertView alloc] initWithTitle:@"Success" message:@"Your InApp Purchases were successfully restored" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [new show]; 回答1: You can use this code to replace an alert view: UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Title" message:@"Message" preferredStyle:UIAlertControllerStyleAlert]; [alertController