Posts by Rici • 392 points
23 posts
-
0
votes2
answers42
viewsA: How do I turn a login button on and off on Swift?
Hello @YAGOCOMY, the problem with your implementation is that you have included an extension within another: import UIKit class LoginManagerViewController: UIViewController { @IBOutlet weak var…
-
3
votes3
answers424
views -
0
votes0
answers38
viewsQ: How to capture photo and video by the same Avcapturesession?
Hello I’m trying to create an app like Snapchat. From the same button, I intend to allow the user to take a photo (Touchupinside) and record a video (long press). I’m using Avfoundation for this.…
-
0
votes1
answer116
viewsA: How to adjust the height of a Uiview on Swift 3 according to subviews?
To have this behavior, you will use the intrinsicContentSize of UIView. To do so, simply add NSLayoutConstraints from the top to the bottom of your UIView "mother". For example, imagine we have a…
-
0
votes1
answer76
viewsA: How to use the Search Bar with the person class - Swift 3
Try to replace the line return item.range(of: searchText, options: .caseInsensitive, range: nil, locale: nil) != nil For: item.lowercased().range(of: searchText.lowercased()) != nil…
-
0
votes1
answer272
viewsA: Button to quit app
There is a method to "exit" the application: exit(0) UPDATE Quoting the reply of Jeff Wolski (translated into English): According to Apple’s Human User Guidelines... Do not close the application by…
-
0
votes1
answer193
viewsA: Using the camera
To show only the "image" (what the camera is seeing), use the AVCaptureVideoPreviewLayer (solution in Swift 3.1): import UIKit import AVFoundation class MyViewController : UIViewController {…
-
0
votes1
answer200
views -
1
votes1
answer61
viewsA: What is the Nslayoutconstraint "Aspect Ratio" for?
I ended up formulating the question in English, the answer was quite useful: https://stackoverflow.com/questions/43123670/for-what-should-i-use-the-aspect-ratio-nslayoutconstraint UPDATE Explanation…
-
0
votes2
answers175
viewsA: How to share a pdf that is on a Swift webview
Hello, for this case use the UIActivityViewController: if let shareURL = URL(string: "http://www.meusite/01_2017.pdf") { var shareItems = [Any]() shareItems.append("Compartilhar em...")…
-
0
votes1
answer27
viewsA: Pass locations and coordinates of a Uitableview to a Mapkit
You can send the object by UISegue by the method -tableView:didSelectRowAtIndexPath:: - (void) tableView:(UITableView *) tableView didSelectRowAtIndexPath:(NSIndexPath *) indexPath { NSString…
-
1
votes5
answers241
viewsA: Uitextfielddelegate does not hide the keyboard
Hello Try: itextField.endEditing(true)
-
1
votes1
answer127
viewsA: How to set maximum size of 2 textfields separately (Swift)
Hello, You can differentiate each UITextField: @IBOutlet weak var meuTextField1: UITextField! @IBOutlet weak var meuTextField2: UITextField! func textField(_ textField: UITextField,…
-
3
votes1
answer67
viewsA: How to receive data of subitens from a plist?
Hello, I believe your first problem ("Está retornando nil") is that the property details in your struct Employee is a dictionary like [String:Any], but in her . plist she is a array of dictionaries.…
-
0
votes1
answer54
viewsQ: How to show a method description in Xcode auto-complete?
I am developing a Framework and I would like when the user type himself and auto-complete suggest the method, below/above appear for what it serves. Like this: I thought I just said that: /** *…
-
1
votes1
answer711
viewsQ: Command to comment multiple lines in the Xcode?
Hello Is there a shortcut for commenting multiple lines in the Xcode? I mean, I use it today /*...*/, but I have to go to the beginning of the block to mark the beginning and do the same until the…
-
2
votes1
answer61
viewsQ: What is the Nslayoutconstraint "Aspect Ratio" for?
Hello, Since I started working with Autolayout, I couldn’t find anything that would explain how/for it NSLayoutConstraint Aspect Ratio. Even in the Apple documentation I couldn’t find anything to…
-
6
votes2
answers1003
viewsA: Swift 3 / Xcode 8 - How to change the native language of my App?
To do this, you must use Portuguese as a language in your project. By default, the base language is English. To add another language, go to: Access your . xcodeproject; In the upper left corner,…
-
0
votes2
answers191
viewsA: How to migrate data between views using Tab Bar Controller (Swift)
I suggest that: This data is persistently saved somewhere where both environments have access (e.g.: Coredata, Sqlite, Realm, Userdefaults, Property Lists, etc) That you use Key-Value Observing to…
-
1
votes2
answers150
viewsA: Is it possible for a Closure (Swift) to capture reference of the instance of the object that executes it?
Not. Why? Clousures sane Reference Types. That means when you declare a clousure a variable, you are declaring its type, not its value. The contents of this clousure yes will be the value of your…
-
1
votes2
answers166
views -
0
votes1
answer112
viewsA: Uicollectionview in 2 columns
So that the UICollectionView present the cells as expected, you have two options: Increase your cell size; or Increase the spaces between your cells and the edges. 1) Increase your cell size In this…
-
1
votes1
answer129
viewsA: Swift 3/Realm - How to filter an Object inside another filter
I believe the dynamic must be different. First we need to find the object Courses with the code _codCurst specified. For this purpose: let predicateCursos = NSPredicate(format: "codCurso == %@",…