ios8

NSUserDefaults “Pause” / Crash on iOS8

一个人想着一个人 提交于 2019-12-08 08:48:59
问题 Ok, so I launched an app last week before iOS8 came out. Everything was working fine in iOS7 and below. But now since people have updated to iOS8 my app is pausing/crashing for no reason. I came to terms that it is when I set an NSMutableArray to the NSUserDefaults, it pauses. Please note, the NSMutableArray is an array of NSStrings. BUT (this is weird) if I breakpoint skip through the code it works and I get no pause. Here is the function that it is blowing up... -(void)UpdateMyAgenda:

How to store data from a picker view in a variable when a button is pressed?

有些话、适合烂在心里 提交于 2019-12-08 08:43:08
问题 I have a picker view with one component that I populated with an array of data. When the user presses a button, I want the selected data in that row to be stored in a variable so that I can send it to another view controller using a segue, where it will be displayed in a label. The only part I'm having trouble with is actually getting that data to be stored in order to be used somewhere else. I know that using a datePicker, I can do something like this to do what I want: @IBAction func

Call function in view controller from UITableViewCell

落花浮王杯 提交于 2019-12-08 08:03:43
问题 I have a problem which drives me nuts, how is it possible to invoke a function in a view controller from within a UITableViewCell. - I am doing that in Swift. So I have a View Controller - called mainVC in this mainVC I have declared a tableView which holds a UITableViewCell (Custom/ Dynamic) in that tableView cell I want call a function which is declared in the mainVC. If I do like self.superview?.myFunc doesn't work. I hope someone can help me... 回答1: It is not as easy as that unfortunately

how do i enable autofill password for a wkwebview

依然范特西╮ 提交于 2019-12-08 07:16:47
问题 I'd like to enable the "Autofill Password" in my wkwebview. I can't seem to find any documentation or examples online on how to do this. 回答1: This IS actually doable using 1Password Steps to implement it in Swift Add the extension files: OnePasswordExtension.h OnePasswordExtension.m Then include them using a bridging header: #import "OnePasswordExtension.h" Finally, you can use the following in your project @IBAction func onePassword_btn(sender: AnyObject) { OnePasswordExtension

How to implement tap to focus on barcode scanner app using swift?

不羁的心 提交于 2019-12-08 06:42:32
问题 I am using this code to create a barcode scanner app. The scanner is ok, but i want to make it better by adding a tap to focus feature. How do i do that? I tried google searching it and tried to convert this example to my app, but i was unable to do it. Here is my app code. Thanks... Barcode scanner code import UIKit import AVFoundation class ViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate { let session : AVCaptureSession = AVCaptureSession() var previewLayer :

CSStickyHeaderFlowLayout swift

点点圈 提交于 2019-12-08 06:26:09
问题 I'm trying to make parallax photo effect in my app using CSStickyHeaderFlowLayout - https://github.com/jamztang/CSStickyHeaderFlowLayout/ and Swift language. I have installed necessary Pod's file, add #import "CSStickyHeaderFlowLayout.h" to my "appName"-Bridging-Header.h file, and implemented this method: func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView { var cell:

How to implement tap to focus on barcode scanner app using swift?

只谈情不闲聊 提交于 2019-12-08 06:18:24
I am using this code to create a barcode scanner app. The scanner is ok, but i want to make it better by adding a tap to focus feature. How do i do that? I tried google searching it and tried to convert this example to my app, but i was unable to do it. Here is my app code. Thanks... Barcode scanner code import UIKit import AVFoundation class ViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate { let session : AVCaptureSession = AVCaptureSession() var previewLayer : AVCaptureVideoPreviewLayer! var highlightView : UIView = UIView() override func viewDidLoad() { super

MultipeerConnectivity - MCNearbyServiceBrowser constantly finding disconnected peers

守給你的承諾、 提交于 2019-12-08 06:15:18
问题 I´m working with MultipeerConnectivity Apple framework. Connection, advertiser and browser seems to work very well until now but I notice that when my any session connects a peer an then it disconnects for any reason my MCNearbyServiceBrowser still finding that peer even if it doesn´t exist anymore. Obviously MCSession reports a not connected status with the peer. Does anyone has an idea of why this is happening? I have override the dealloc method in my mc handler class like this: - (void

Move to another ViewController

依然范特西╮ 提交于 2019-12-08 05:26:47
问题 Im using StoryBoard and i am not so sure how to instantiate a ViewController or how to reference one. The thing is i have two view controllers and i have one with a button. I want to go to the other view controller when i pressed the button from the first view controller. I have tried something like that: let secondViewController:UIViewController = UIViewController() self.presentViewController(secondViewController, animated: true, completion: nil) Does anyone knows how to explain it to me?

SOAP service not responding if message length greater than 65535 in iOS8

别等时光非礼了梦想. 提交于 2019-12-08 05:15:42
问题 I am developing an app using IOS 8 in which I am using SOAP service to save data to server. Service works fine and getting response if my method name string length is less than 65535. If my method name string length is greater than 65535, then I am not getting any response from server. Here is the code. -(void)fetchDataFromURL:(NSString *)finalURL withMethodName:(NSString *)methodName withType:(NSString *)methodType migrationCompletionHandler:(void(^)(BOOL resultValue, NSData *responseData,