iOS: Best way to implement settings with multiple sections [closed] - ios

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm implementing a settings screen in my app that has several sections.
Section-wise:
May be something like general app settings like:
only download over WiFi
disable auto dimming
May be something for a different category of settings lik:
default text size
etc.
So... In total I'll have 4 or 5 of these sections and each will contain 2 - 5 options.
Some of the sections will have headers and others may not.
I've attached a screenshot of the Vesper app to show the idea I'm talking about.
My question is this:
Is it best to use a UITableView with Sections (grouped) to accomplish this, or just separate UIViews manually placed at the positions I want them?
(For what it's worth, I'm not using Interface Builder)

In the end, UITableViews only take care of presenting and reusing UITableViewCells, which inherit from UIView, so your question is basically "should I reinvent the functionality the table view already provides?"
And the answer is no, you shouldn't.
Even though you won't be getting much out of the "reuse" mechanic of table views, you will still be able to use everything else, the ability to hide/show rows animatedly, maybe some of the cells are identical (like text weight cells) and can be reused from the same identified queue, etc.
And if you want to implement a settings outside the app, then take a look at the settings bundle, you don't even need to code, you just link a few plists together and get an interface done for you.

Related

Should I use UITableView or UICollectionView when building a chat app? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I'm trying to build a chat app like the native Messages app/Whatsapp.
The design is a little bit different than the native chat bubbles (rectangle messages view instead of bubbles) but I guess the basics are the same. Of course the messages should start from the bottom of the screen like any chat app, and in the bottom there should be a "new message" textField.
Should I use UITableView or UICollectionView for this purpose?
Thank you!
I just finished shipping a chat app and went through this exact question when building the architecture. This isn't a hot take.
I made the mistake at first to go with UITableView only to realize halfway that UICollectionView is way more powerful. (UICollectionView even has a tableLayout if you want to use it this way).
I realized this after studying the other chat libraries available like JSQMessagesViewController, MMTextureChat, MessageKit etc.
UITableView is good but soon enough you'll run into performance and customization issues like I did.
As for showing the messages from the bottom, the trick is to flip the view. That way when you call insert(atIndexPath:) the item shows up at the bottom.
Hope it helps.

Xcode - Swift arrange images in a grid 2x4 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am developing a universal iOS app. I am looking to achieve the below grid layout using 8 images (inclusive of the text).
My skills of autolayout are poor, especially for universal apps. I would like the layout to remain for iPad and smaller screen devices, and scale the images accordingly.
I am unsure how to achieve this. Could you suggest a method and perhaps point me in the right direction by providing suggestions on methods to achieve this, such as UICollectionView or grid layout using autolayout.
Collection view! It's a great way to arrange things in a view like this that automatically adapts to screen size.
Apple docs - https://developer.apple.com/library/ios/documentation/UIKit/Reference/UICollectionView_class/
Simple example you can follow - How to make a simple collection view with Swift
UICollectionView is a powerful tool, can be tricky to nail down at first but follow along on the tutorial and you should be able to make your design in no time!

iOS UI design pattern for consecutive yes/no questions [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
If I'm making an iPad app for a questionnaire that consists of 10 "yes/no" questions, what is the best way to go about this from a UI design pattern perspective?
I want only 1 question to be shown at a time. I have thought about maybe a UIPageControl, but that doesn't seem to really fit. Also I have thought about a self looping segue on the question view controller, but this also seems like it might have its own problems. What about a sidebar with each question in a list?
What is the standard/accepted/best way to go about this type of problem from a UI perspective?
With this requirements, my solution is to use a navigation controller with 1 ViewController that takes 3 params: question index, question content (to be displayed), response (to be chosen). Application begin with first question then go next for another question. The answers will be saved into a Dictionary.
If one question is shown at a time with yes/no, I'd use UIAlertView control personally. This way you can use many different dialogs, Here is Apple Developers Reference on UIAlertView:
https://developer.apple.com/library/ios/documentation/uikit/reference/UIAlertView_Class/UIAlertView/UIAlertView.html
If you have multiple selections or multiple choice questions use UIActionSheet. See my SO answer:
Creating UIActionSheet
I had the exact same problem 1 year ago and I used a self-looping UIViewControllers (I'm not a huge fan of storyboard). I didn't see any problem with that. With proper data structures set up, you can very easily allow user to answer/go back/exit.

How to make a table/Grid in iOS? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I would like to create something like the image below in my iOS app. What is the best way to approach this, note the rows and the columns can vary.
The easiest way I thought of was to insert html table into UIWebView, but not sure if there is a way to intercept radio button clicks like there is for a regular button by making it a "href link"
A little unrelated to what you have as the title of your question, but maybe look at using UISegmentedControl. It's the closest thing to radial buttons that exists in the Objective-C world.
If you went with a segmented control, you no longer need to worry about columns, intercepting touches, and a lot of the other problems you mention in your Question - it could all be done in a normal UITableView. You would have to create some custom UITableViewCell subclasses to get the segmented controls in, but there are a lot of good tutorials (YouTube, Apple Docs, SO) on how to set those up.
From iOS 6+ you could use the UICollectionView class to build up a grid. Managing the values in the data source (representing if a radio is checked or not) is something you'd have to implement yourself.

how to know the default properties' values of UI controller in iOS [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
how to know the default properties' values of UI controller in iOS?
Such as an alert view, I have Cancel/OK button on it, how could I know the Cancel/OK button's border color, border width, border's shadow?
And others, like button on navigation bar...
To sum up everything that's been said here - you can't get most of the data you need for the standard UI elements in iOS. You can however NSLog any of the UI elements and check out some of its properties. Be mindful of the fact that about 99% of the system UI elements have read-only properties meaning you can't change their look and feel directly (and honestly, you shouldn't).
Check out interesting projects like UI7Kit that allow you to port iOS 7 design to earlier iOS versions. Also Cocoa Controls are highly recommended for any UI customisation tweaks.

Resources