how to add DropDownComobo in uisearchbar ios - iphone

I want to add one dropdowncombo in UISearchBar like mail application (NSTokenField).
On clicking that combo it will display the list of items. I have read many blogs but there is no public control from Apple. Is there way to do this?

NO. you have to use UIPickerview or UISegmentedControl to create a drop down menu.
If you want custom control,you can check this link:-
https://github.com/katokichisoft/KSPopoverView
if you need any further assistance..please reply to me..
you can also use action sheet..Its upto you..
enjoy..

There is no build in control to make dropdowncombo. Instead you can use picker or as in mail application there is a custom controller. you can make it Simply by a table view on a view and presenting it. You can also show the list of Items in the UIPopOverController by adding the controller having table view and manage the content size of the popover.

Related

Difference between table view controller and a table view placed within a viewcontroller

I am making an app and would like to direct my user once they log in into their dashboard, I have seen some apps display things in what seem like a table view controller or a view controller with a table view. I would like to display the logo up top and then a table displaying their username then about 4 more rows displaying other info then at the bottom a tab bar. What would be the best way to go about this?
any advice welcomed. If relevant I am using swift, Xcode7 and parse to handle my users
Use a UITableView. This a bit more customizable in terms of Storyboard layout. You can place UIImageViews, toolbars, and other elements all over your UIViewController. You can then put a UITableView in the exact place that would work for you, with the dimensions you need.
Of course, you could always use a UITableViewController. You could embed this controller in a variety of combinations, which would let you add tab bars or navigation bars.
The only real difference in implementation is that you have to remember to explicitly write the delegate and data source methods when using a UITableView.
For your case, I would pick whatever seems easiest to implement in your case. Probably a UITableView in my opinion.
Some differences between UITableViewController (TV) and UIViewController with TableView (VT) I know:
You can add other controls into VT and pin it to anywhere you want. TV can't do that.
You can add many same group of controls without add constraints with TV. VT you have to add constraints.
You don't want to worry about scrolling in TV with many group of controls.
With TV you can create static table cell but you can't with VT. Static table works on TableViewController only.
In your situation, I use UITableViewController with static table to achieve that.
Hope this can help.

Allow userinteraction iphone sdk?

Is is possible to allow the view to be editable (allow user interaction) when a UIActionSheet is in view? For example [nameofactionsheet showInView:self.view];. Normally whenever the action sheet is open the user can't play around with view behind it. Is it possible to allow interaction?
thanks
Not if you use UIActionSheet.
But you could implement with custom logic perhaps..
Wrap the UI in your custom view (for showing different choices)
Add that custom view to your desired view controller's view
Voila ;)

Present a UITableView as drop-down list using the iOS SDK

I want to implement a drop-down list in an iPhone application, the same like you might have seen in iBooks when you select PDFs/Books.
I have a slight idea how to implement it, just correct me if I am wrong:
Create the button
On a click event of the button define a CGRect and within the CGRect draw a LoadTableView
Load TableViewData at runtime.
Is that correct? If not, how should I do it?
Here's a much better/easier way to do it.
Create custom UITableViewController and associated nib. Use this class to encapsulate your tableView and data.
When the user clicks on your button, instantiate your custom view controller and display it modally using presentModalViewController:animated
When the user has selected an option from your popup view, call back to the parent view with the results.
Dismiss your table view with dismissModalViewControllerAnimated:
This is what iBooks does with a highly customized UITableViewController.
Are you looking for a UIPickerView?
This component gives you the possibility of selecting from a custom number of elements through a dedicate table view. Use it in conjunction with a UIActionSheet to get the best results.

Cocoa Touch drop down box on iPad

I am implementing an iPad app that needs to make use of a drop down box or something to filter items in a tableview.
Can anyone suggest a control? I can't use the picker view (because you can't adjust height) and the segment view can't hold enough items.
In this instance, I'd be tempted to use a UIPicker view in an UIActionSheet. (Or other similar modal dialog.)
That said, it might be more appropriate to use a Search Controller to filter the UITableView. (Really depends on the application.)
Sounds like you could just use a Search Controller to me, is your data categorisable? You could be better off just creating a hierarchy and navigating through it using a Navigation Controller to move between tableviews.

How do i add button style cells to table views in iPhone apps?

I'm not able to find any specific examples in apple's documentation on this. I want to add two to three buttons to a table view programmatically, much like the contacts app does with the send text message/ add to favorites buttons on a contacts's info. does anyone know how to configure this?
What I've done in my apps is create a view with the buttons on it and return that view in the tableView:viewForHeaderInSection: and/or tableView:viewForFooterInSection: methods of the UITableView delegate.