How to achieve a hidden status bar using three20 framework - iphone

I'm using the TTThumbsViewController section of the three20 framework, and I have the status bar hidden throughout my application.
When the user views the full size image, taps the screen(hiding the controls), when they tap again the controls reappear but the status bar is there too.
I've searched through the whole library and been unable to isolate the section where this is happening. I'd love it if someone could point me in the right direction.
Thanks,
BB

I found it hiding in the UIViewControllerAdditions.m which is called by the TTPhotoViewController.m
UIViewControllerAdditions.m
- (void)showBars:(BOOL)show animated:(BOOL)animated {
//[[UIApplication sharedApplication] setStatusBarHidden:!show animated:animated];

This doesn't seem to be it whatsoever. Or at least you did not answer your original question. The showBars is not used to show or hide the status bar but rather to show and hide the navigation bar items.
Unless of course you are talking about adding that bit of code you have commented to the showBars. That code does not even appear in my version of Three20 code.

Related

XCode iOS - home screen style navigation

Sorry this is a pretty silly question, but I cannot think what the actual menu style is called. I'm trying to find a tutorial on how to create a instructions page that you flick through left and right to see more instructions. Basically exactly how the home screen works with dots representing how many screens there are and which screen the user is on, plus the same animation where if you flick left/right the next one slides on.
If anyone knows what these are commonly referred to as I can go look up some tutorials.
Thanks a lot,
Chris
This control is called a UIPageControl. And here's a link to a tutorial.
Use a UIScrollview with pagingEnabled.
add a UIPageControl to the view (wherever you want to see the dots).
Instruction pages should be added as subviews to the UIScrollView
Make sure to use UIScrollView and UIPageControl delegates to update the page in the pageControl.
If you need more info on how to implement this, search with keywords UIScrollView and UIPageControl

Can my custom tabbar be created like so for iPhone?

I have designed a custom tabbar and the developer says the design I created can't be done.
The screen is made up of a usual background with a tabbar. I'd like my tabbar to look a little different to the usual iPhone style. I would like at the bottom of the tabbar a grass illustration (transparent) and on top would sit all the separate buttons and on top of those would be the icons. All of these images (as seen in link below) are separate .png files.
When the user scrolls the content, it will scroll under the transparent grass. The buttons of course will be clickable and have a different view for an active state.
Please see the link below to see a mock-up of the image:
http://www.stuartkidd.com/dummy.jpg
I'd appreciate if the community could explain to me if this could be done and if so, how. I thought it would have something to do with 'creating a custom tabbar'.
And a further question, if it can be done, can also the tab buttons be horizontally
scrollable with a swipe action?
Thanks,
It all can be done but you are going against the Iphone UI guidelines. You won't be able to leverage the UITabbarView to do what you want so you'll basically have to write the whole thing from scratch. Your tab bar would be a scroll view with a row of buttons representing each tab. When a button is clicked you load in the appropriate view. The UITabBar controller gives you a lot of functionality for free and I suspect once you start working towards this you'll see exactly how much extra work this will end up costing you. Going against the way Apple does things can be a slippery slope.
Another idea might be to keep a hidden UITabBar to manage the tabs and call it from your custom tab bar. This would free you from a lot of the hassle of swapping views/controllers in and out.
You can create a row of custom buttons and have 2 subviews. One for the bottom navigation bar and one for the content view where you will be swapping your content based on what is pressed.
You can have a state which maintains what was clicked. Based on that you can set the button enabled state for every button in your bottom bar.
button.selected = YES
It will be easy to handle the touch up inside events and properly load appropriate views in and out of the bigger subview as they will be part of the same view controller.
I have implemented a similar functionality and it works well but still in process of submitting it to the app-store.

Really cool way to create custom UITabBar for iPhone app?

I am doing a lot of researching lately about how to get a different looking with nice effects UITabBar on my iPhone app, but unfortunately I am only finding things on how to replace background color etc.
Well, I've checked out this app called Momento which is pretty cool and presents a very slick tabBar:
So there are a couple of elements here I would like to ask you guys if you could help me by giving me the right directions on how to get a similar effect :)
Arrow above items: as you can see this app has this animated arrow that runs above the selected item with a very smooth animation.
Selected Stated of the item's image is not that blue-ish default one neither the default state which displays in a different shade of brown and gray version.
nice Items separators with beveled vertical lines.
different background image for the tabBar
different height for the tabBar
At this point after some research I am able to set the height and background image by subclassing UITabBarController but I'm still not sure on how to accomplish the other items specially the first one related to the nice arrow effect.
How do I do this? Please clarify what can or can't be done by subclassing the UITabBarController and specially if can be done in Interface Builder.
There's a project on github called BCTabBarController that aims to mimic the tab bar used in Twitter for iPhone. It's got some of the things you're looking for, and should give a great starting point.
Both of these are good answers, but both libraries have problems: BCTabBarController doesn't know how to create the "blue" highlighted version of a tab bar icon; and iDevRecipies doesn't send events to child viewcontrollers nor resize the navigation bar on rotate.
Be warned: custom nav bars are a lot of trial-and-error debugging (as I have found).
Simply use a UIView with TabBar width and height.Add custom background image and custom buttons on the view.Set the fileowner of the view as AppDelegate.Now you can simply connect the IBActions with the buttons.The Custom view can be placed over the tabbar by addSubView to the TabBar controller's view.You can switch between viewcontrollers by using the setSelectedIndex method of tableviewcontroller in the button action.

How do I detect a double-height status bar?

The HIG (p.47) says that I have to be able to handle the double-height status bar that appears during phone calls or voice recordings.
How exactly do I handle this situation?
I really only have 1 screen where a keyboard with toolbar over it underlaps a textfield when the double-height status bar shows - on other screens things are just a bit scrunched up but useable.
If I could detect that a double-height status bar exists, I could maybe adjust the placement of the textfields or make them temporarily shorter but is it possible to detect when the double-height status bar is there?
EDIT: Maybe if there were a way to get the absolute coordinates of a known thing, like the nav bar, and if it was +20 pixels off, I'd assume that the double-height status bar is present. Thoughts?
And a secondary question, if this (or anything) works, I'd just like to hide the regular status bar using
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]
but I don't want to hide both - basically a lazy way not to have to touch any of my screens - if the double is there, make it a single again by hiding the regular status bar. Will the above code hide both?
You can monitor these call-backs of UIApplicationDelegate:
application:willChangeStatusBarFrame:
application:didChangeStatusBarFrame:
And it's easy to test this in the iphone simulator: Hardware->Toggle In-Call Status Bar
Depending on your situation, your views and the things in them can resize automatically to fit the space - check the View Size area of the inspector window in Interface Builder on various objects
This issue also occur when user use many other utilities like hotspot. To solve this issue I use following line of code ( as I was myself stuck in this ).
self.tabBarController?.tabBar.autoresizingMask = UIViewAutoresizing(rawValue: UIViewAutoresizing.RawValue(UInt8(UIViewAutoresizing.flexibleWidth.rawValue) | UInt8(UIViewAutoresizing.flexibleTopMargin.rawValue)))
Objective C reference for same issue available here

Full Screen Image Preview

Can someone please tell me how to get a full screen image preview view when someone taps on an image view of a nib... like the one in appstore application screenshots....
it will be a real help...
Thanks in advance
The first thing you need to do is subclass UIImageView.
Then in your subclass make sure that user interaction is enabled (either by setting it in code, or by checking the box in IB).
Then you need to override the touches:DidBeginWithEvent: (et al) methods (they're found in UIResponder), and put the code for what you want to happen inside them. For example, you could create a larger image view, and then attach it to the view hierarchy.
As for making it completely fullscreen, you'd need to set the frame of the image view to that of the Window, and hide any Tab Bars, Navigation Bars, Status bars, etc.
You can hide the status bar by using
[[UIApplication sharedApplication] setStatusBarHidde:YES];
Hide navigation bars:
[navigationController setNavigationBarHidden:YES];
so on and so forth. You should be able to find ways to hide most things by looking at their docs.
Hope this helps.
I actually wanted a control like the image preview in photos and that on facebook maybe....
which i found in the open source three20 repository... google it to find out ....