ucladevx / Bruin-Bite-iOS

Mozilla Public License 2.0
8 stars 1 forks source link

Redid login/sign-up UI and navigation #99

Closed cliffdawg closed 5 years ago

cliffdawg commented 5 years ago

Fixes #96

I redid the auto-layout and constraints for the login/sign-up controllers, and tested them out on multiple iPhone simulation sizes. The layout is now primarily based around horizontal and vertical center constraints.

I embedded the login/sign-up flow into a Navigation Controller, and transferred all the top elements into the navigation bar. I implemented the required segues through override func prepare(for segue: UIStoryboardSegue, sender: Any?) { } in each ViewController file.

I created a Utilities file for reusable helper functions such as func displayErrorLabel(text: String, field: UIView) and func formatNavigation(controller: UINavigationController) The displayErrorLabel function animates an error message with a given text above a given view passed in through the parameters. Call it from the static instance of the Utilities object to use it anywhere in the project. The formatNavigation function sets up the navigation bar with the specified color, font, size, and icons in the Zeplin files.

Additionally, I installed the ViewAnimator pod to make animating the error message much easier.

I added a file called ClearBackButton to the Assets folder. The purpose this serves is that the default back arrow icon for the navigation bar can't be removed or made transparent, so my solution was to set its image to that of a clear image file, which for all intents and purposes solves the issue.

HirdayGupta commented 5 years ago

@cliffdawg thanks for the pull request! I'm going to get round to reviewing it soon, in the meanwhile, can you post screenshots of the new screens (with or without error labels, for any iPhone) just to get some visual documentation of your changes in the PR?

HirdayGupta commented 5 years ago

@cliffdawg also, as a general rule, you should add in the "Fixes #__" at the top of your PR description to indicate to Github which issue to close when this PR is merged.

cliffdawg commented 5 years ago

Here are the screenshots. https://user-images.githubusercontent.com/18109476/48045147-f25c6500-e143-11e8-86f2-913f1595326f.png https://user-images.githubusercontent.com/18109476/48045150-f6888280-e143-11e8-91cd-f9fce4ca5f80.png https://user-images.githubusercontent.com/18109476/48045151-f7211900-e143-11e8-89e5-9bcf7b16d512.png https://user-images.githubusercontent.com/18109476/48045152-f7211900-e143-11e8-9304-20bcd7c0faeb.png https://user-images.githubusercontent.com/18109476/48045153-f7211900-e143-11e8-8128-dc81c5e9c527.png

HirdayGupta commented 5 years ago

Merged into networking-rework #105 and successfully into development in b1e9e16a067f3b3c1788f56b2ddf26800ada7b9a