Post not yet marked as solved
I'm building an app where you can take a photo, it saves the photo to the app's documents directory, and I'm wanting to pull the GPS info from those photos.What's the best way to do this?Thanks!
Post not yet marked as solved
In my LaunchScreen.storyboard I have a simple image that's constrained to the view to be in the very center of the screen.The problem is that if the user is holding the phone in landscape mode the image doesn't appear at all.Any ideas on how I can fix this using constraints, code, or some other method?Thanks!
Post not yet marked as solved
So my app has the ability to receive friend requests, which is just a record in my database saying User X sent a request to User Y.While User Y is logged in and using the app, what's the best way to know when that new request has been added by User X?Should I just periodically hit the server looking for any new updates and then updating the UI accordingly, or are there other practices that are more efficient?Thanks!
Post not yet marked as solved
I've created a file called Functions.swift and inside that file I have a function called showAlert that (I want to) lets me open an alert from anywhere:func showAlert(title: String, message: String, viewController: UIViewController) {
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
let dismissAction = UIAlertAction(title: "OK", style: .default) { (action) in
// Action
}
alert.addAction(dismissAction)
viewController.present(alert, animated: true, completion: nil)
}I have a UIViewController called CreateAccount.swift and I'm trying to call showAlert but I'm getting an error:Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIKeyboardTaskQueue waitUntilAllTasksAreFinished] may onlybe called from the main thread.'And when I print out viewController it displays the correct UIViewController (CreateAccount) but it's not working like I'd expect.Any ideas? Thanks!
Post not yet marked as solved
I'm wanting the users of my app to be able to login with their email/password, Facebook, and Twitter.Setting up a database to compare the email and password makes sense, but what about when they choose to login with Facebook or Twitter? Do you simply compare the email addresses from those accounts or do you set something else up entirely?Thanks!
Post not yet marked as solved
I'm using Xcode 9 with Swift 4 and I'm laying out my app in Main.storyboard.One of my UIViewControllers has a view with a UISegmentedControl and a UIScrollView. As the segmented control is toggled I want to show different controls in the view.What's the best practice for doing this? I'd really like to layout the views in Xcode and not programatically.I tried dragging UIViews onto the storyboard but Xcode won't let me. I can drag UIViews into the UIScrollView but things get cluttered and adding constraints seems tricky.Any tips would be great. Thanks!
Post not yet marked as solved
I have a UIViewController and I've placed a UINavigationBar inside of it but I can't figure out how to properly position it. It won't let me resize it vertically and if I place it too high it won't look a regular navigation bar.Below is an example of how I have the navigation bar set now just to look as normal as possible. But you can see it's not sized right.Any ideas? Thanks!
Post not yet marked as solved
Long story short, I have an app on the App Store that was built a couple of years ago that I'm wanting to rebuild using storyboards and other technologies - but I don't want this new project to be a new app. When I submit the new project to the App Store I want it to replace the existing app as an updated version. Is that possible?I'm assuming so but I've never done this before.Thanks!
Post not yet marked as solved
I want the next version of my app to incorporate user accounts and the ability to share data amongst each other.For example, I'd like for a user to create a note, be able to share that note with users through the app, and then those users can make changes to the note with all users seeing those changes live.Will I need to setup my own server and database to handle this, send the message to the users that the note has been updated, etc... or does Apple have a system for handling this sort of thing?Also, for user accounts, does Apple have a system for accounts as well or will I need to create databases to house these users? I'm going to have the ability to tie Twitter and Facebook to the accounts as well.Thanks!