Form Filling apps iOS 7+ - ios

I have an iOS app with 85% form filling screens. And data to be filled contains on an average 8-10 textfields per screen. I'm using scrollview to achieve it. I have done it but is there any proper/ideal way to make the scroll working smoothly for the textfields in potrait/landscape mode for iPhone & iPad?
Thanks.

So they're not smooth at the moment? You might find that a table view approach would handle it better, though without seeing some more details of the app (screenshots or code) it's hard to say!

Related

Building for multiple screen sizes

One screen of my application involves displaying a form - asking the user to enter details which can be posted and saved eventually. In my form, I'm asking for the title, date, description, and attach any images. So there are UILabels, UITextFields, UIButtons, and UITextView involved. And they are displayed using interface builder + constraints.
Now as I view this screen on phones ranging from 8 to XR, I notice, for example in the XR, there is a lot of white space not being utilized. I understand the problem is due to my constraints. How do I adapt my constraints to help with this issue? So in the case of a longer screen such as an XR, my UIViews make use of the space provided rather than being bunched on the top half of the screen. I'm still a beginner w/iOS so I'm assuming it has to do something with constraints but not sure. How can I tackle this issue/change my approach when envisioning iOS applications?
Need some expert to enlighten me w/some iOS wisdom!
It's important to understand how autolayout and constraint works. After that you'll just need to create the UI ONCE in most cases and it will be good for all devices.
Since you're new I suggest putting one object(eg: UILabel) at a time and add constraints on it and see if it works before you add another object
Kindly see this link:
https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/index.html
and there are a lot of tutorial videos in youtube you can watch.
happy coding

How to arrange UI elements so they fit in all screen sizes in iOS

I've been struggling with this issue for a while and hours of research and experimentation didn't produce any acceptable results.
I have a login screen that contains a lot of UI elements. The view looks great on iphone 7 and 6 variations but when I test it on SE or 4S the constraints fail to position the elements so they fit nicely on their tiny screen. Simply there is not enough room. I read that I must support all screen sizes but at this point I am not sure how can I get all the ui elements to fit in the smaller screens.
I watched hours of youtube videos and tried all possible ways including a vertical stack view but no matter what I try, it either looks good on 7 and 6 but terrible on SE/4S or vice versa (good on SE/4S but way too much white space on 7/6).
At this point I am not sure what else I can do. I know it is not possible to design a UI just for a specific screen size and vary for traits is not what I need because I only intend to support vertical orientation.
Any help or suggestion will be greatly appreciated.
As you have said in your own comment, you can restrict the device sizes indirectly by restricting the iOS version. However that is not a good solution: If you are creating the app for commercial reasons that will unnecessarily restrict your market (there are a lot of 4S users out there); If you are learning app development, now is a good time to work out how to manage GUI layout problems properly (there will always be a wide range of display sizes to cope with).
There are several tools available to assist:
Auto Layout
As others have said in comments, Auto Layout can help a lot. Don't just use it to position things though, but also to resize them to make best use of the available space.
Understanding Auto Layout (Apple)
Size Classes
Size Classes allow you to use different constraints and turn on or off controls depending on the general size and orientation of your user's device. For example, where space is restricted you could hide individual controls and instead display a single control to take the user to them elsewhere (another view or a popover for example).
Size-Class-Specific Layout (Apple)
Scroll Views
You can make part or all of your GUI a scroll view that on larger devices will show all the controls whilst on smaller devices initially show just the top ones but still give your users access to the others (don't forget to flash the scroll bars when the view first appears to show them that there is more to see though).
Separate Storyboards
Although you have not mentioned iPad support, you can also specify completely separate storyboards to help layout universal apps.
See this SO answer and it's linked reference for details.

Adaptive storyboard (fit lots of buttons onto all devices correctly)

I have been trying to figure out how to get my app to look good on all apple devices. I will say I made this app very quickly and was not thinking about how it would look on different devices when I was making it. I was just having a good time making it. Until now, since it only looks good on the iPhone 6s, which is what I was testing it on the whole time. This is the basic layout of my app:
Is there any way to format this without starting completely over or is it just too much of a mess to fix?
Thanks,
Austin
Use Autolayout. That is what it's for. You don't have to start over; you just need to add proper constraints to all your elements so that they do the right sort of thing when the app launches on a larger or smaller screen.

All iOS screen size compatibility?

New to iOS developing here. Basically I am creating a soundboard app. I have the app essentially working (aka buttons returning sounds).
However my app only looks proper on the iPhone 6. I just have one ViewController in my main storyboard. When I run the simulator for the 4S/5/6+ or iPads, my buttons are pretty much everywhere.
I tried playing with size classes/autolayout through Apple's documentation, but couldn't get it working properly. What's the best (easiest ;) ) route I can follow to have it basically looking the same on ALL devices?
PS: I have one background placed too, I don't mind if it looks different on all devices since it's pretty minimalistic, but if someone can shed some light here too, that would be great.
Thanks!
You have a few options:
1) Continue your plan spending time getting friendly with Auto Layout and Size Classes. This might be difficult at first, but it will really pay off later. You should use the Assistant Editor's Preview mode to let you see iPhone 4, 5 and 6 side-by-side as you work so you can make sure your layouts look great everywhere.
2) Use a component like UIStackView where layouts are automatically adjusted to fit various devices. If your soundboard is as simple as a grid of buttons, you can do that in just a few minutes using a stack view.
3) Use a component like UITableView or UICollectionView where content is designed to scroll. Using this method you design only one sound button of your app (i.e., enough to play one sound) then have iOS replicate that across all the sounds you want. When your interface is presented on a device of a different size iOS will just make the content scroll.
Very roughly, option 1 makes you do all the work; option 2 makes your layout shrink down until it fits the available space; and option 3 makes your layout stay the same size no matter what, but you should expect it to scroll on some devices.
There is no right solution; it's entirely down how you want your app to work.

Scroll UITableViewCell background like Spotify/Weather app

If you take a look at the iOS 7 Weather app on iPhone you will see that as you scroll, the background of the UITableViewCells scroll too(each independently of the rest). Recently, Spotify issued an iPad update that added the same feature(search for an artist on iPad, then look at their albums). I'm trying to figure out how it's done. I'm thinking it might tie in to how parallax is treated in iOS 7(motionEffects) but I'm at a loss. Any ideas?
I'm trying find same feature, and i create same question with your description of trouble and i find solution, see my question - myQuestion

Resources