How do I deselect a tabBarItem pre segue - segue

I have implemented a tabBar with two tabBarItems.
Once presssed the app segues to the new VC, however when I go back to the main VC the tabBarItem is still highlighted as if it has just been pressed.
How do I stop this from happening?

I just used [tabBarHome setSelectedItem:nil]; in the same block of code that launched the segue, so when I came back to the main VC it wasn't highlighted.
I realize a tabBar is meant to be used in conjunction with a tabBarController.


Codename one do something on screen wake

I want to reload my Form on screen wake is there any way to do so? The header disappears since we only call the method to create the form with the title once.
Pre screen lock/app switch
After screen lock/app switch
Whenever I click one of the menu options the header reappears since we then load a new Form
This is implicit and you don't need to do it. I'm assuming that you did something else such as disable the Toolbar or setCommandBehavior which work inconsistently between platforms.

iOS 7 static table view selection style bug

I think I found a little iOS 7 bug..
If you have a static table view as a part of a navigation view controller and the user use the swipe back gesture to get one level back, the selection highlight doesn't dismiss!
(if the user press the back navigation bar button the selection dismiss normal)
Does anybody also detect this bug?
Does anybody has a fix for that?
Thank you a lot
A quick fix for this could be:
[tableView deselectRowAtIndexPath:[tableView indexPathForSelectedRow] animated:YES];
inside the viewDidAppear method. (not tested)

Configuring bottom bar in QLPreviewController

I have integrated QLPreviewController and UIDocumentInteractionController in my app, and it is working fine.
The only problem is- I want to configure the bottom toolbar, I want to remove the default toolbar items, which appear as shown in image below:
Is there any way to do so, please suggest.
Short Answer: NO, Not in IOS6+
One thing to note about QLPreviewController is that it's not meant to be customized. There were other libraries allowing you to change the functionality such as:
Which are not working in iOS 6+ since apple made a big change in QLPreviewController and it's technically running in a separate process. Although it might be possible (not sure) using private apis but your app will be rejected then.
You can find more info about this change here:
Hope this helps
Subclass UIToolbar
Create UINavigationController using
init(navigationBarClass:toolbarClass:) and supply UIToolbar subsclass created in step 1 for toolbarClass
Create QLPreviewController instance and push onto UINavigationController stack
Inside of UIToolbar subsclass override
setItems(_:animated:). To remove all buttons call super with empty array super.setItems([], animated: false) or potentially you can add only buttons you want to keep.
Present UINavigationController created in step 2
Here is the example PreviewControllerHideBottomButtons
Subclass QLPreviewController.
Search for the Toolbar in the view hierarchy.
Have a UIToolbar property in your class that has the same frame as the original toolbar.
Place your own toolbar above the default one with whatever buttons you want.
If you want it to be hidden as the default behavior of the QLPreviewController you can key value observe the hidden property of the default toolbar and present / hide your own accordingly.

UICollectionView Tutorial Request

Looking for a tutorial or help doing the following
Keep it as an iPad App and using Storyboards. I need a (this is my Main) viewController (No Detail or Navigation View) with a popover that displays a UiCollectionView (and the Cells) of images). I want a ContainerView inside my main). The Container displays a default imageView and selection from the CollectionView, changes the Image in the Container. Also, the segue from the CollectionView Cell to the Container's Imageneeds to be of Custom Segue Type.
Remember, it's for an IPad, with Storyboard. No detail or Navigation Controller.
How's that for a Tutorial. There is nothing else like it right now and I could sure use the help.
This one appears pretty good.. The code is also sitting on github..
Yet another UICollectionView tutorial

Show NotifyIcon Context Menu and Control Its Position?

I'm trying to show a context menu when I left-click a NotifyIcon. Just calling NotifyIcon.ContextMenuStrip.Show() doesn't work very well. A solution has been posted here before that calls a secret method using Reflection:
Dim mi As System.Reflection.MethodInfo = GetType(NotifyIcon).GetMethod("ShowContextMenu", Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic)
mi.Invoke(Icon, Nothing)
This works great, except that I also need to control where the menu is shown. I want to wait for the SystemInformation.DoubleClickTime to elapse between receiving the NotifyIcon.MouseUp event and displaying the menu, so that I can handle single-clicks and double-clicks separately. But invoking the ShowContextMenu method displays the menu at the current mouse position when ShowContextMenu is called, not when the icon was actually clicked. Which means that if the mouse moved during the DoubleClickTime, the menu will be displayed in a different part of the screen. So if I can control where the menu is shown, I can just save the mouse coordinates when I receive the MouseUp event, and then I can ensure that the menu is displayed near the icon. Is there a way to do this?
Thanks in advance.
Well, I just discovered that there are existing programs that exhibit this same behavior. I just went through all the icons in my system tray and about half of them do it. If you left-click the icon and then move the mouse during the delay before the menu appears, the menu will appear at the last mouse location, wherever that is on the screen. Snagit is one application that does this. Outlook is the only program in my tray that always shows the menu where I clicked the icon. But Snagit looks like it's using a .NET ContextMenuStrip, while Outlook is probably using a native menu.
So either this is standard behavior, or it's a problem that no one else has been able to solve either. And as a user, I've never noticed this behavior until yesterday when I was testing my own application. So I guess it's not that big of a deal and I won't worry about it.