How i can open Location services direct to my app?
I want it to go to the screen where the user chooses allow location or not can be enabled in the app..
UIApplication.shared.open(URL(string: "App-prefs:LOCATION_SERVICES")!)
this code open for me only the location services but how i can open location setting to my app?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have a problem with the search, it doesn't search for each letter individually,
these only if it is word is together, for example:
I search Kate it will find but if I type Kae (that still has the letters in it), he won't find it, why?
filteredData = contacts.filter {name in
return name.firstName.lowercased().contains(searchText.lowercased()) || name.lastName.lowercased().contains(searchText.lowercased()) || name.telephone.removeCharacters(from: CharacterSet.decimalDigits.inverted).lowercased().contains(searchText.lowercased())
}
i attach screenshot
I’m encountering an issue since I started using Xcode 16. I have a widget in my app, and I'm trying to organize the code by splitting it into different files for better structure.
However, when I do this, I get an error:
error: Unexpected input file: /Users/******/Desktop/TestApp/TestAppWidget/Provider.Swift (in target 'TestAppWidgetExtension' from project 'TestApp')
I want to emphasize that if I keep all the code in one file, everything works fine.
I've checked the Target Membership, and it's set up correctly.
but I don't understand why this is happening only in Xcode 16.
Has anyone else experienced a similar issue or has any ideas on why this is occurring? I would appreciate any help!
how i make a List like at swiftui at storyboard?
the UITableView not the same..
look image:
https://i.ibb.co/Qn69TRR/Untitled.png
how i can do List like a swiftui in storyboard?
I made an extension to UIViewController and inside i have function I use several times:
extension UIViewController {
func transitionToHomeVC() {
let homeViewController = self.storyboard?.instantiateViewController(withIdentifier: NameConstants.StoryBoard.homeViewController) as? HomeViewController
self.view.window?.rootViewController = homeViewController
self.view.window?.makeKeyAndVisible()
}
}
And I have a registration button and as soon as you click if the information was received and correct and etc ... then he has to move me at the to the HomeViewController screen and he does not do it.
He does all the actions but does not pass to screen.
@IBAction func signUpTapped(_ sender: Any) {
// Validate the fields
let error = validDataFields()
if error != nil {
// There's something wrong with the fields, show error message
Service.showError(vc: self, message: error!)
}
else {
// Create cleaned versions of the data
let fireName = firstNameTextField.text!.trimmingCharacters(in: .whitespacesAndNewlines)
let lastName = lastNameTextField.text!.trimmingCharacters(in: .whitespacesAndNewlines)
let email = emailTextField.text!.trimmingCharacters(in: .whitespacesAndNewlines)
let password = passwordTextField.text!.trimmingCharacters(in: .whitespacesAndNewlines)
// Create the user
Auth.auth().createUser(withEmail: email, password: password) { resulte, err in
// Check for errors
if err != nil {
// There was an error creating the user
Service.showError(vc: self, message: "Error creating user \n make sure you enter: \n current email")
}
else {
// User was created successfully, now store the first name and last name
let db = Firestore.firestore()
db.collection("users").addDocument(data: ["firstName":fireName,"lastName":lastName, "uid": resulte!.user.uid]) { error in
if error != nil {
// Show error message
Service.showError(vc: self, message: " Error saving user Data")
}
}
self.transitionToHomeVC()
}
}
}
}
why it not move to homeViewController?