Swift 2.1 opposite of removeFromSuperview

Swift
Because I do not want topContainer to show till later. I removed it from the superview on viewDidLoad. override func viewDidLoad() { super.viewDi...
1 year ago

using public key encryption in swift

Swift
I am trying to use a public key provided to me by web service developer to securely transfer data. I have tried hard but I am not able to find any wor...
1 year ago

How to Resize image in Swift?

Swift
I am making an app for iOS, using Swift and Parse.com I am trying to let the user select a picture from an image picker and then resize the selected ...
1 year ago

Link UIAlertAction to open another ViewController

Swift
Basically i have a uialertaction which needs to show another viewcontroller when pressed. At first i did it but now even though i dont get an error co...
1 year ago

Adding buttons for each object in array

Swift
I have an array of objects, and I want a button for each object in the array. Am I doing it correctly? The buttons are not showing up on the view, and...
1 year ago

Can't build on Device with Swift on Xcode 7.2 (not related to Provisioning Profiles)

Swift
This is not related to provisioning profiles I added SnapKit (0.18.0) with Carthage (0.10). Whenever I try to run on a device with Xcode 7.2, I get e...
1 year ago

Swift: UITableViewCell selection challenge

Swift
I created a simple demo app for this problem, which is not vital but I am looking for an elegant solution. I have a grouped tableview with multiple se...
1 year ago

swift show alert with custom cell

Swift
I have a custom cell. It has an UIImageView and a button. When I click the button, my app will save my image to Photo Album and show an result alert. ...
1 year ago

Swift dictionary put [UInt8] as a value does not work

Swift
I create a dictionary in swift: var type:String var content:[UInt8] let dict = NSMutableDictionary() dict.setValue(type, forKey: "type") dict.setValu...
1 year ago

Can someone solve my query regarding CPTPlotDatasource in corePlot

Swift
Here CPTScatterPlotFiledX shows error as: Binary Operator cannot be applied to operand of Type _CPTScatterPlotFiledX and UInt! and same for CP...
1 year ago

Swift - mixing abstract and concrete methods

Swift
Swift has no abstract classes and methods. Instead, it offers protocols. That's fine when your classes are either fully abstract or fully concrete. ...
1 year ago

UITableViewCell selection challenge

Swift
I created a simple demo app for this problem, which is not vital but I am looking for an elegant solution. I have a grouped tableview with multiple se...
1 year ago

fade in fade out for an images array swift

Swift
I have a global variable of images array public var images = ["11", "12", "13", "14", "15", "16", "17", "18", "11", "12", "13", "14", "15", "16", "17...
1 year ago

How to show google maps directions from WebApp inside a UIWebView?

Swift
I'm working to build a IPA from my WebApp, after run my WebApp inside a UIWebView my page that shows a google maps with a router not works more. The ...
1 year ago

class function with generic return value

Swift
Right now I have the following classes: class A { class func instantiate() -> A { return MakeObject() } } class B: A {} let x = ...
1 year ago

Find the indexPath of a button inside UITableViewCell when button pressed?

Swift
The code below correctly returns the cell: func findSuperView(sender:UIButton!) -> UITableViewCell { var superView : UIView? = sender.supervi...
1 year ago

Can't use advanced custom fields value from Wordpress

Swift
I am trying to use values from my Wordpress server in my Swift project. I get the information in JSON format. The values that I want is created by "ad...
1 year ago

Calculate age from birth date

Swift
I cant find age in from birth date. What I got is fatal error: unexpectedly found nil while unwrapping an Optional value (lldb) My code override...
1 year ago

Adding a view controller as a subview in another view controller

Swift
I have found few posts for this problem but none of them solved my issue. Say like I've.. ViewControllerA ViewControllerB When I tried to add Vie...
1 year ago

How do I use a UIButton while it's animating

Swift
I have found one similar question to this but it did not answer my question. I have a UIButton which is animating from the bottom of the screen to the...
1 year ago