How to make a menu (multiple button?) iOs - ios

I am new in the development of iOS with swift, for the moment everything goes well but there is one thing that I blocked.
How this kind of menu?
How do you call this ? Because I do not even know what to look for because I do not know his name: /
Sorry for my bad english and thank you for your help :)

This can be made by using click on button open a view or open a tableview inside the table view put the label on each row and after that use didselectrowatindexpath method of tableview for click on each row open the new page or viewcontroller.

You can use table view to show dropdown menu. Show tableview on click and hide when select row. this is the basic concept. and if you not want to code your self then there many third party libraries available on github like DropDownMenu or dropdownment etc.
Note : standard way in ios for this kind of stuff(drop down or selection from multiple option) is UIPickerview, so you can use this also it very easy. so if not required to use hardcoded dropdown then pickerview is best option.
hope this will help :)

Related

Submenus in UITableView

I am building an app that uses a side menu, within that side menu is a UITableView displaying some text. When you click on one of those, it takes you to another ViewController. I searched the internet for it but didn't find something useful. My question is: how to make a "submenu" inside the tableview, so that when you click on it, it needs to dropdown and show more options.
I don't have any idea how to do this, so a little help would be really appreciated!
Thanks
You may use sections for building a submenu structure. You can overwrite viewForHeaderInSection for each section for which you don't want to display the section header and return an empty UIView object with a size of (0.0, 0.0) or even null. (I never tried returning null/nil myself.)
For each menu on the highest level you have exactly one corresponding section and each of them has just one row. They may or may not have header views.
For the menu that you want to display as submenu you set the header view of the related section accordingly and then have one row for each item of the submenu.
Unfortunately this allows for a 2-level menu heirachry only. But on the upside everything you need is already sort of build-in into cocoa touch.
Perhaps this could possibly help you achieve what you are looking for:
Expandable Sections UITableView IndexPath SWIFT
You may have to have a good look through the code but it should set you on the right track.

iOS UIButton or Single Row UITableView For Dropdown Like Thing?

For iOS 7 and iOS 8, we're implementing these things that look like drop-downs, but each just launch a modal window.
What makes more sense, using 3 UIButtons, 3 UITableViews with 1 row, or something else? In the past, there would be more than one of these all lined up, so I would put them in a UITableView and set the accessoryView of the UITableViewCell. Using the cell was nice, but three UITableViews seem like overkill here and a maintenance hassel.
The closest post I found regarding this was one about using an UITableViewCell outside of UITableView
What would make the most sense is to follow the iOS design guidelines. Instead of trying to create custom dropdown menus (or worse: showing a drop down menu, but displaying a modal view when the user is expecting a drop down view), that UI could be replaced with 1 UITableView that has 3 UITableViewCells in it. The text on each cell would be the name of the setting to be changed and selecting the cell would push segue to the next page. This will give the app a uniform iOS UX; allowing users to know exactly how to use your app because it works similarly to other apps on their phone. Check out the Settings app on the simulator to see what I am describing.
I don't see any advantage to using a UITableView or a UITableViewCell. I think this is clearly a case for three UIButtons. You can set constraints to keep them nice and clean. One cool thing that might be worth investigating is using a unicode character for the downward arrow. That way you could have the tap feedback on the whole "thing" as you called it.
When I need to create sort of dropdown menus, I usually take advantages from UITableView, one above all is when you will need to add one or more selections in the dropdown you just need to change the data model.
UITableViewCells are easily customizable that means that you can create almost everything you want.
I think that your design doesn't adapt well to a mobile application, those kind of menu are more web style, with 3 buttons and a UIPickerView you can really improve the user experience and also adapt in a really easy way on the ipad embedding the picker in a UIPopoverController.
as i agree with #keithbhunter, but still if you want then may this links will help you.
http://code4app.net/ios/DXPopover/54741ca3e24741c56db03ca0
https://www.cocoacontrols.com/controls/kxmenu
https://www.cocoacontrols.com/controls/nidropdown

Make dropdown menu in IOS app with swift

How can I make a drop down menu in my swift IOS app that has different options that the user can select, whatever they select displays in a label above the menu. Example: drop down menu to select age in an app. Or like the select size and quantity option in the following link http://store.nike.com/us/en_us/pd/roshe-run-shoe/pid-463712/pgid-943980.
Please let me know if you can help me accomplish this, Thanks!
I achieved similar feature on Objective-C, hope the same concept can be applied on swift.
I actually subclass a UITableView with some customized functions and variables, then instantiate the class with desired coordination and dimension and use UITableViewDelegate methods to trigger the events needed.

Two functionality for left slide ios

I am building an iphone application which is a aster details app. By default, the left slide for the table cell gives the delete option. But i want to add one more option to that (Edit). Just like the latest whatsapp does. Can anyone give pointers how to proceed with this and oblige.
You can use this library to setup a custom swipe with custom buttons:
Custom Table cell view

table view is covered with an empty table view when integrate TTCatalog to a Tabbar template project

I created a project with Tabbar template. The First View of my Tabbar project just wants the same function of the TTCatalog sample project. The Second View will integrate a Map function.
I integrate some code from TTCatalog sample project to do so. But when my App starts, only an empty tableview displayed in my first view. It's just a white table with some empty rows. nothing else.
When I quit my App from emulator, and start it again from emulator,first I can see a table view like that of TTCatalog ( with blue titles and labels), But soon the table view is covered with an empty table view.
Please help
thanks
There is no need to inherit CatalogController, if the only thing you need is a tableView inside a tabBarController then there is even no need to use three20 at all. To get started I would recommend you use a simpler approach. While three20 and the TTTableViewController can help a lot with a certain kind of setups, it is not the general best way to do things.
Let your FirstViewController inherit from UITableViewController, implement the UITableViewDataSource methods. If you are experiencing problem or need with a specific problem feel free to ask here.
If you got this working and you really need something that three20 can help you achieve, read through the TTTableViewController sources, TTModel, TTTableViewDataSource, find a tutorial and go on.
Maybe this question may help you: Three20's URL-based navigation + tab bar example? especially this link: http://three20.pypt.lt/url-based-navigation-and-state-persistence

Resources