Posts by Ricardo Pereira • 205 points
6 posts
-
0
votes2
answers180
viewsA: How to delete Tableviewcell as a Swift Dictionary
The problem will be access to indexPath. He’s forcing you to do optional Unboxing with the !. In defining the method, indexPath: NSIndexPath! is already automatically doing Unboxing so just have to…
-
3
votes1
answer709
viewsA: Turning user input into button label
I checked your code and I think the best approach would be to store the reference of the selected button. I made the code simpler to understand the steps. The method textFieldShouldReturn is part of…
-
0
votes1
answer59
viewsA: Sharing via Uiactivityviewcontroller
When building a UIActivityViewController you need to enter a NOT-null list as the first argument activityItems. Must contain at least one item. Example: let someText:String = textView.text let…
swiftanswered Ricardo Pereira 205 -
4
votes2
answers6761
viewsA: Mask for Uitextfield
You can use Vmasktextfield where you just need to indicate a mask to take the format. For example: self.maskTextField.mask = @"(##) ####-####"; Other examples:…
-
-1
votes2
answers141
viewsA: How to access a Cocoa Touch Framework module on Playground Swift
By default classes have visibility internal. It’s only necessary to make the class public and you get the access. public class Foo { public init() { } }…
-
0
votes2
answers832
viewsA: Example of Picker View in Swift
It will be necessary to implement UIPickerViewDelegate and UIPickerViewDataSource. With Swift I try to use extension because it makes the code more explicit in order to know the methods inherited…