I use the side menu (jonkykong / SideMenu) when developing an application for iOS and ran into a problem. I need a menu that will be displayed on all ViewController, everything seems to work, but when you switch to the second controller, a new menu opens with the second controller, but the old menu. The only thing I found in the developer's questions is that it's necessary to destroy the old menu before switching to the second controller, but I have not found it anywhere. The code for my menu is exactly the same as in the example, except for the TableView in the menu itself (the list of menu items is implemented by tables) and the implementation of the standard functions of selecting on the table cell. I am hope for your help. Thank you very much.
Link to the side menu itself:
github.com/jonkykong/SideMenu
Photo1
Photo2
Related
In whatsapp, when we go to any particular user then at right corner there is more option (three dots menu). Then after clicking that menu, one list will come and again at last row there is navigate arrow, then after clicking on that row again new menu will come.
here is the images,
after clicking on more option, following view will appear
I want to implement this feature in my iOS Project. Anyone have any idea how to implement it ?
You can manage it with multiple ways!
First Way : Take two table view for the menu. Initially keep one tableview hidden. Then on more's click of first tableview, show second tableview and hide firt one.
Second Way : Take only one tableview and reload different data. I mean on click of main change your datasource for tableview and reload it.
DropDown menu's are considered bad practice in iOS. Use one UIAlertController to show first options, than on selecting the More show another UIAlertController.
I have this form:
Green arrow: Tab General, and I'd like to keep it always visible, but when the form is smaller than the tabs, TPageControl creates a navigator (the red arrow).
It's good, but I'd like to allow the user navigate but keep showing the possibility to click on the General Tab.
Example:
In this picture, I used the navigator and I can't see General Tab anymore.
I'd like to keep it as the first tab on the PageControl, like a "fixed column" in Excel for instance.
Yes, I didn't found a way to fix the tab! But I solved my problem creating a custom page control based on our discussion on this thread.
You can check it here
In my application, I have a menu that is defined as follows. Each item on the menu is a node that has the following data attributes:
MenuText : (the text that would appear for that item)
isView : Whether this item is a leaf level item or not
subMenus : if isView is false, then there are multiple menu items under this attribute.
Thus, it is a tree structure that can go till any depth. The items in the menu can change periodically and hence the implementation has to be kept flexible. This data is stored in a plist file and read into an NSArray in the code (already implemented).
I now need to create a slide out menu on the left that will be populated by this data hierarchy. I have created the menu pane and added swipe gestures to it, all of which work fine. The menu has to be a collapsible one where clicking on one menu item expands the subViews below it. If the item clicked on is a view, then a new view is loaded on the rest of the screen with appropriate data.
The problem I am facing is the logic to populate the menu (which is a UITableView) from the NSArray data. The following are the two approaches I came up with.
Create a UITableView with as many sections as there are items at the top level of the menu. Then iterate through the menu items recursively. For each menu item that is not a view (i.e. it has subMenus), create a new section with number of rows equal to the number of subMenus under it. When I come across a menu item that is a view and has no further subMenus, add it as a row to the subsection created for the menu one level above it.
Create a menu with one section and as many rows as the number of menu items at the top level. When a menu item is clicked, insert rows under it to represent its sub-menus. When another menu item on the same level is clicked, collapse the previously expanded menu by deleting the inserted rows. When a menu item with no sub menus is clicked, the rest of the screen is populated with data.
I have tried both the approaches and not been able to go beyond the initial steps. For the first method, I understand that I need to add a UITableView as a part of UITableViewCells, which is good, but I need to do that recursively. For the second approach, I need to know the indexPath of each item clicked which can go to many levels.
I would like some suggestions here about which approach I should take and some guidance over how to go about it. Also, if there is any better way to do this, kindly advice. Thanks.
In my opinion, using UINavigationController is the easiest way. You can push as many UITableViews as you want.
If it doesn't fit your design requirement, you can try expandable UITableViews. There are few open sources:
JKExpandTableView
SDNestedTable
iOS-Tree-Component
Thanks for the responses. I ended up doing this using the following control:
Accordion for iOS
It has served my purpose beautifully and I posted it here so that someone with the same requirement may find it.
Take a look at TLIndexPathTools. It has a "Tree" extension that can do this. Try running the Outline sample project. The main task in adapting the sample project would be to write a recursive function to convert your array of nodes into an array of TLIndexPathTreeItem objects. All of the code in the controller:willChangeNode: method is examples of lazy loading and it doesn't sound like you'd need any of that.
Is there anyway to only show the menu item alias in the URL without its parent alias? I know I can create a hidden menu with all items in the root level but this will make the breadcrumb unusable.
For example: www.mysite.com/grand-parent/parent/child
I like it to be just www.mysite.com/child
I have url rewrite/sef turned on using Joomla 2.5.
Thanks,
Will
There is a workaround.
Create a seperate menu and create menu item in that menu with required alias.
Then on the menu you want the link in the first place, create a menu item of type menu Alias and select the seperate menu item as target. This way parent alias will no appear infront for any alias type menu items.
No need for any workarounds. It works straight on.
(Written for J 2.5 but J 3 should be the same)
Choose the menu item which you wish to remove from the SEF URL (the parent menu which provides the url). Open it from the menu manager
In the section on the left, titled "Details" there is a row with "Alias". Next to it there's a button "Inherited". Click it so it becomes "Not Inherited".
Save & Close
Voila! It disappears .
It work's with "Direct Alias" extension.
http://extensions.joomla.org/extension/direct-alias
After instaling it "Inherited" button apears next to "Alias".
I have just had a similar problem and this plugin worked perfectly to achieve what I needed. This saves me hours of work creating 301 redirects. I had to buy the pro version to get the control over individual menu items. This gives you the functionality Ben Shomer describes above eg Next to it there's a button "Inherited". Click it so it becomes "Not Inherited". The free version controls ALL menu item aliases. Great plugin, highly recommended.
To perform what you want to do :
1- Install "Direct Alias" extension : http://extensions.joomla.org/extension/direct-alias
2- Go to "Menus" -> "All Menus Items" and select your menu item.
After "Alias" field you will have two buttons "Relative" and "Inherited".
Click on "Relative". It will transform to "Direct". Save and test.
You have now a direct link for your child item in your menu.
Note : If you don't install Direct "Direct Alias" extension the two button will not display.
I'm not sure it's possible with core Joomla.
You can achieve this - and complete control over your SEF urls - with the sh404 extension.
I solve it by following these steps.
Create a hidden menu which is your child menu. (For creating the hidden menu go to the Link Type tab and select No for Display in Menu option).
Then create your parent menu with a type of anything under the System Links (except Menu Item Alias)
Create a menu (as a child of the parent menu you have created before) with the type of Menu Item Alias and select the hidden child menu you've created before as the Menu Item.
That's all. Now you can show your menu structure like-
|-Parent
|--Child
And when you click on the Child link the URL will look like mysite.com/child
Let's say I have two tabs tabA and tabB. When I click on tabA the first page of that section appears, call it tabA1. If I click on a link on that page then page tabA1 is replaced with tabA2. If I then click on another tab, say tabB, and then go and click on tabA again I get an image of tabA2 lingering for a bit.
How can I make it so that clicking tabA will always show tabA1 straight away? Is it saving it in the cookies for fast access?
Before switching additionally try setting the content in the tab (or equivalent wrapper) to display : none.
This is happened to me and that's how I fixed it. Although I know it fixes the symptoms and not the exact problem.