iOS UI: How to make the control that is used in alarm app? - ios

I want to create several controls just like the ones below the date time picker in the alarm app. They look like label controls, but they have a title on the left, the currently selected data value on the right, and an arrow all the way to the right. The Snooze control does not have an arrow, but I believe it is the same control. What type of control would I use to do this?
Any samples out there for this in Swift?
Thanks in advance.

It sounds like you are talking about different styles of cells of a table view.
The first control you mentioned (label on left, selected data value on right) is simply a table view cell with the RightDetail style and Disclosure Indicator accessory view.
The control with the switch is not a default cell style so you will have to make your own custom Table View cell. There are plenty of tutorials online that show how to make your own style of Table View cells. The item on the right is just a regular Switch.

Related

SegmentedControl and Uipageview query

How can i add sub options with segmented control like in the given Screen?
Also i want to inquire about how can i add blurr effect to last/next page views just like the given screen. Thanks for your help

How to design a add new entry screen like in the Health app?

I'm creating my first app and I wanted to design an "add a new item" modal like in the health app:
Here I have three questions:
How the 3 input fields are designed that you see the hint all the time on the left and the imput on the right? Is this just one field?
Are this 3 fields usually stored in a tableView?
Is the entry for the Date a special keyboard type or a DatePicker?
That looks like a UITableView with a custom cell which has a UILabel on the left and an input field on the right. The picker is a UIDatePicker

How to make text field like this in swift?

I want to make this kind of text field in my application. Could you guys suggest how to create a text field like the ones shown in this picture?
What you're showing in the picture is table view cells, not simply text fields. Do you want table view cells that look like that? You want table view cells if your view controller is a UITableViewController. You can easily create a nib file (cmd-n, iOS User Interface, Empty, name and save it), drag out a Table view cell from the asset library, and then drag in the label and text field (see below) into the cell.
If you don't have a UITableViewController, you could just put a UILabel (for the 'Apple ID' or 'Required' part) in your view controller's view in interface builder and then add a regular text field, write its placeholder in the Attributes Inspector, and then choose the 'Border Style' (again, in the right Utilities panel in Xcode) on the far left, the one that looks like dashed lines (this is 'no border')
Use UITextBorderStyleLine from UITextBorderStyle enum
ObjC
typedef enum {
UITextBorderStyleNone,
UITextBorderStyleLine,
UITextBorderStyleBezel,
UITextBorderStyleRoundedRect
} UITextBorderStyle;
Swift
enum UITextBorderStyle : Int {
case None
case Line
case Bezel
case RoundedRect
}
Edit:
The first image was different from the new one. So, the picture shows that It's a table view(as you can see there's header for each section) that the first section contains two text fields. The two text fields' border style is UITextBorderStyleNone.
Use Eureka! It's an open source library available on Github - https://github.com/EurekaCommunity
It's really useful for creating form-based table views like the one you've described above.

In Xcode Interface Builder - why are the options in the Editor--->Arrange menu (containing Send to Front, Send to Back) often disabled?

What I'm trying to do is simple: bring a label in front of an image within a subview.
But all of the options for arranging are disabled/un-selectable when my label is selected. I find this happens often.
What could be the reason that I'm almost never allowed to change the z-axis of my objects in the Arrange menu? Is it a better practice to avoid this feature and set the order of views programmatically?
It can depend on how you have selected the label (similar to how the label can only be moved with the keyboard when selected in some ways).
A simple alternative is to look at the list of view in the pane on the left and to drag the views up and down to change the order.
It happens sometimes. In that situation, click the view or image you want to send back then you will see little square box at the edges of image from which you can re size your image, Just click on it once and then go to Editor > Arrange > Choose option according your need.

How do I activate an in-place editor for a grid cell that displays as a progress bar?

One of the cells in my DBTreeListView is bound to a repository item that is a progress bar.
I want to be able to edit the progress displayed by clicking on this cell. At this stage my application should change its cell to another repository item: a text field where I'll be able to insert a value. Once focus is changed to another cell, my progress bar should be displayed again, showing a new value. How do I do this?
DBTreeListView has column events OnGetEditingProperty and OnGetEditProperties. I'll probably use one (or both) of them, but can't come up with any good idea.
This can be simply. You should handle click on this progress bar and display editor over it. You need to handle scrolling and clicking in another place to get rid of editor. And in case that scrolling too far - editor should be hidden.
Steps:
Create hidden editor for progress
Handle OnClick for tree view item
Display editor and set focus
On editor enter (or tab) save progress information
On click on form or another part of tree view - hide editor (saving/discarding changes how specified by your policy)
On scroll tree view move the editor and when bounds of parent does not overlap bounds of editor - hide it
Best regards,
Vladimir

Resources