I am trying to incorporate a similar kind of view in an app. So, was wondering if its a tableview or something else?(see attached image) I am very new to learning swift and would greatly appreciate if someone could help me identify how this kind of structure can be made. Just the name of the element to be used would be enough. I will look up the details on Apple Docs.
It is a customized UIPickerView with two components. Just like the default Date Picker in iOS.
These questions should help you in styling the UIPickerView:
How can I change text font in picker in iOS 7?
Custom UIPickerView with Custom Background color
For that last question, please take a look at DShah' answer.
Addition to Nina's answer, below are some of the good custom Picker view controls which will be good to use in terms of performance and customizable.
http://www.cocoacontrols.com/platforms/ios/controls/cppickerview
http://www.cocoacontrols.com/platforms/ios/controls/afpickerview
http://www.cocoacontrols.com/platforms/ios/controls/v8horizontalpickerview (Horizontal PickerView)
Related
I'm trying to create something similar to the following:
You see the dates at the top just underneath the search bar? Is that a nested tab view as I'm guessing? Is there a way to do it with the default components or do I need to create a custom view?
I'm not looking for a coding answer per se. I just want to know if there's a standard way of achieving this before trying to implement my own solution.
EDIT:
For future reference I found a library that does exactly this.
Apple's documentation states :
The tab bar interface displays tabs at the bottom of the window for selecting between the different modes and for displaying the views for that mode. This class is generally used as-is, but may also be subclassed.
https://developer.apple.com/documentation/uikit/uitabbarcontroller
So I would guess that it is a custom solution.
Inside a tableview cell i want to display text like
Marc is now friends with Chris.
I want to use both Marc and Chris as buttons to navigate to their profile.
My first idea was to use NSAttributedString but i do not know if i can use the text as different buttons.
I´m not a complete newbie so navigation works, display of cells works everything works.
I am not asking for working code but i have no idea how to solve this...
Maybe someone could tell me wich class could help me.
Thanks in advance.
Use TTTAttributedLabel from github. Provides this capability out of the box using various attributes on NSAttributedString
I was exploring the new Apple Music app the other day, and found a rather peculiar action sheet...
Until now, I didn't know either UIAlertController or UIActionSheet could have dividers like this! Come to think of it, how did they get that top button to look like a table view cell?
I have poured over both the UIActionSheet, UIAlertController, and UIAlertAction documents without success. So far as I know, Apple doesn't look kindly to subclassing these, or messing with the view hierarchy.
My questions then, are as follows:
How can I reproduce those thicker divider thingies on my own action sheets?
How can I reproduce that top button, with an image and descriptive text below the main action body?
Is there any current API that provides this functionality?
Any guidance would be much appreciated. Thank you in advance.
This is a normal UIAlertController or UIActionSheet but the last sheet has a custom view which is an image and 2 label
you can see these questions if you want to know how to produce that with the normal UIActionSheet but it's a little tricky
First Question
Second Question
Third Question
Ch Tut
or if you don't want to use any hacks on UIActionSheet or UIAlertController you may use these library as a replacement for Action Sheets JGActionSheet
other libraries
ahkactionsheet
rmactioncontroller
sgactionview
I have used UIDatePicker as native control and also used libraries mentioned over Stackoverflow and github. But i want to have a calendar view , horizontally scrolling days in a row like in image.
Please share your ideas/logic about what are possible solutions to achieve this functionality. Thanks
You can use library that is most closest to functionality you required and can customize its appearance as per you need.
https://github.com/CapitalGene/objc-CGCalendarView
Seems like a perfect time for a horizontal collection view. Just have some sort of calendar datasource and you are good to go. Should be able to use the flow layout and set the direction to horizontal and kapow, done.
I want a text field similar to the stock messaging app in the iPhone. Text field should have the same look and should be expandable to allow multi-line editing. Could you please suggest a method to get this in my app?
Thanks.
Use a UITextField.
To get the height of the text field use -sizeWithFont:constrainedToSize:lineBreakMode:.
To have the look of the Apple's text field put an image behind the text field that looks like Apple's text field. See -resizableImageWithCapInsets: to get the image to stretch properly.
Have a look at this :
UIBubbleTableView
EDIT :
The previous link was for the "bubble styled" tableview. If you want the view where you actually type the message, this is the one :
HPGrowingTextView
For other people who are searching for libraries but the ones mentioned here are with many bugs
Here is a library:
SlackTextViewController
A drop-in UIViewController subclass with a growing text input view and other useful messaging features. Meant to be a replacement for UITableViewController & UICollectionViewController.