The 'Cut Copy ...' interface popover that displays on the iPad -- I want to create my own popover that is displayed similarly, but I can't determine how theirs was implemented.
It looks like a UISegmentedControl with some styling, which should be easy to implement, but whenever I create a popover and put a view inside it, I can't seem to remove the popover border. Basically, what I want is a popover that has the aesthetic of a UISegmentedControl (e.g. contains the popover arrow as well). This must be easy, as I see it done all over the place. Any suggestions?
The UIMenuController is what I was looking for.
Related
I need to create below thing
Currently i'm using WYPopover , but I can't create the button since it's outside of the popover. Is there any existing solution out there ? Many thanks
Create a bigger popover UIView holding all your child elements (current popover + button) and make its background transparent or however you wish.
Popover-controller's are exclusively used in iPad. If you want to use in iPhone, you should create it in a custom way.
I am not familiar with the XYPopover in Github, but normally the custom created popover should be dismissed whenever the user taps any place in the screen. That is one of the key feature of the popovers.
Normally the custom popovers are build like, adding a hidden parent view and then the visible image of a popover frame on it.
You should to do the following,
Avoid dismissing the parent view on tap of parent-hidden-view.
Add a close button at the area where you want to show the close button, on top of the parent-hidden-view.
Capture the button click and dismiss the view (remove the view from superview)
How to customize your need
Creating custom popover view is not a big task. It will take maxim one day, try it your self.
One Parent view with clear color
One background image of a popover frame.
View-inside popover (this needs to be customized for UIPopover also).
Close button.
I am developing an application that requires a scrolling UITabBarController. The customary 5 tab items max with the 5th being the More.. tab just won't do. I have found some pretty great third party classes such as https://github.com/Marxon13/M13InfiniteTabBar and they are great and have the functionality I would like but still, things aren't perfect. When I rotate my device to landscape things become glitchy.
Basically, I am fed up and want to create my own custom UITabBarController with scrolling..how would I go about doing this? I understand I would most likely put a UITabBar within UIScrollView but I am lost without a detailed tutorial of sorts..
Any help would be greatly appreciated! Thanks!!
The way I would approach this is to avoid modifying the UITabBar, since it is highly specialized, and create a UIViewController subclass that will provide this functionality for you. This view controller should have a container view (take a look at this Apple documentation for more detailed information) that will have each child view controller's content view.
For the actual tab bar itself, you have a few options depending on what you similar you want it to the standard UITabBar.
You could have a super basic tab bar that consists of a UIScrollView with standard UIButtons that change/load the correct content view controller. Creating the tab bar would be then easy, simply add the buttons to the scroll view inside some type of loop (you could have the x positions be a multiple of the tab index to make positioning easier). UIButtons have support for a selected button state that you can use. You can change the scroll view's background.
You could have a fancy tab bar which is constructed essentially like the above, but by having a custom UIButton subclass instead of a standard UIButton. This will allow you to implement a more intricate design (i.e. with and more customized touch handling.
Tips:
Use [myImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] to have your tab images tinted like the standard tabs when selected.
Design the basics of your custom view controller in your storyboard. It is really easy to add the child container view and the scroll view this way.
Hope this helps!
I'm making an application that requires the use of a dock (think Mac dock) where I can have different items that I can drag out onto a map view.
It would make sense to me to just use and subclass a UITabBar, since you can easily add items to that bar in the interface builder. However, I'm not sure how I would transform a UITabBar into something more dynamic like the Mac dock, where things are only highlighted when the user touches them, copies of that tab can be dragged out, ect.
To that end, just a side question, what's the difference between the UITabBarDelegate and UITabBarControllerDelegate protocols?
I also thought of another way I could implement my task bar/dock using some sort of collection view with UIImageViews. That would be easier in terms of implementing drag and drop, highlight selection, ect but I would lose that nice, native iOS feel that the UITabBar has.
Any suggestions?
do one thing. create a custom class for tabbar add a view over it. and add image views over the view place small images in that view and add gesture recognizer over it. When the finger comes over it replace the smaller image with the larger one. and also change the tab bar selection if the user taps over it. you can do this by using tabbar property. or you call the tabbar delegate manually when the tap is made.
I have a nice iPhone app built that uses a UINavigationController to navigate through a series of tableviews. I now want to add a persistent banner at the top of all of my views, either above the navigation bar or just below it. I do not want it to scroll with the tableview, so I do not want to make it a custom first row.
Any ideas on the best way to approach this?
What I did to achieve this was to make a new UIView for each of the views that I needed the banner on, and placed the banner in there, and the table or other view below the banner. This doesn't keep the banner there persistently through the transitions which is what I really wanted, but I was able to get a non-scrolling header above my tables.
EDIT:
The "correct" way to do this now would be to have a root view controller that consists of your header, and a container view, and then all of the navigation and content goes inside your container view. Although this does require ios6+
You could customize your navigation bar so that it displays the "classical" bar and then, above or below it, it draws your specific content. See this post for more detail.
I am looking for a solution to customize PopoverController view in my iPad app. I need to remove the pointing icon along with the popover view and to make the view to the middle of the App window. It should go back to the button from where it is popped when we click on anywhere other than the popover view. USA TODAY app in iPad included such an option. I am not sure about how did they implemented it.
You would need to create your own custon view and animate your self. There is no Appple provided solution