I am working on an web service based application. I need Loading/waiting imageview that should disable my Tabbar & Navigationbar of the screen till Loading of web service . The issue when I keep the imageview that contains the waiting animation over in my viewcontroller, it disables only self.view. Can anybody please tell what i went wrong?
Regards,
sathish
You can either hide the tab bar by tabbar.hidden=YES or if you want to remove the tab bar from the window and put it again, you need to release the tab bar and then allocate it again...
But releasing the tab bar will make your app crash, so before releasing the tab bar remove it from super view.
[TabBarController.view removeFromSuperview];
[TabBarController release];
then allocate it again and put it on the window
[self createTabBar]; // createTabBar is a function creating a tab bar
[self.window addSubview:TabBarController.view];
[self.window makeKeyAndVisible];
Related
I have a viewcontroller that will include a WKWebView. My viewcontroller is inside both a navigationcontroller and tabbarcontroller. The WKWebView appears over both of these, hiding the tabs (on the bottom), and the title and back button (on the top), and they only appear when you scroll up or down. How do I fix this.
Found it. Changed the webview's scrollview backgroundColor.
I think the title says everything about my problem.
The ImageView is not in the UIWebView.
I want that the ImageView is pushed up by the WebView.
It's actually pretty simple. If you go into your storyboard (or nib) and choose the the webView and choose a color for it's background property, anytime you scroll above the view that background color would appear. So all you need to do is load an image for that background color.
In your viewDidLoad method, place this bit of code:
self.webView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:#"background.png"]];
and where it says background.png
just put the image name that you loaded into your project.
Hope this helps!
I'm trying to modify an app to work with the new iPhone 5, 4" screen.
I've added the new launch image, "Default-568h#2x.png".
After that everything seemed good. Middle portion of my views is resizing ok.
However I've noticed that in a view where I have a bottom toolbar, the buttons on the toolbar are unresponsive. It looks ok, but tapping buttons does nothing. Same code run in simulator with 3.5" screen works fine.
Any ideas?
This view is within a navigation controller. It consists of a table view and toolbar. The tableview is set to resize height.
I had the same problem and noticed that my window.frame.size.height was still 480.0.
Solved this problem by enabling Full Screen at Launch for the MainWindow.xib file:
Steps:
Open MainWindow.xib
Select the Window element
Open the Attributes Inspector
Under Window section, enable Full Screen at Launch
There are two solution to this problem :
If you are using MainWindow follow these steps :
a. Select MainWindow.xib
b. Select 'Full Screen at Launch' from Windows option available in Attributes Inspector.
If your application doesn't contain MainWindow then just add 'Self.View.Frame = [UIScreen mainScreen].bounds' in ViewDidLoad.
I your project has MainWindow.xib then you must have to set all splash images in order to compatible you app for iPhone 5 display.
My Project wasn't using MainWindow.xib. I added the following to viewDidLoad in View Controllers of all the screens:
self.view.frame = [UIScreen mainScreen].bounds;
add
self.window.frame = [UIScreen mainScreen].bounds;
in this method:
-(BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary*)options
in your %your app name%AppDelegate.m file
I have a view with a UITabBar and the navigation bar is initially hidden. When I press the next tab I want the nav bar to be shown, but when I do this using setNavigationBarHidden: the view gets resized, and the tabbar is pushed out of the screen. How do I setup the views to where they won't get resized? Or get resized properly?
You will have to check your autoresizingMasks. You can adjust them programmatically or via IB. Autosizing is available in the Size Inspector on the right.
You will mostly have to change the tab bar's mask to fix it to bottom and left. Rest of the subviews will have to be handled as needed.
[self.navigationController setNavigationBarHidden:NO animated:NO];
or
after that
set urview frame to exactly for 44reduce(which is navingation bar height) from height.
I am having a weird problem.
My game is all landscape. I have a inapp purchase button in my app. When I tap on that button I see the normal alert button in landscape mode. But when I press the home button and reopen the app, then tap on the inapp purchase, the orientation of the Alert box changes to portait.
I have no idea why this is happening. Have you guys ever had this issue? Any ideas or suggestions welcomed!
This worked for me:
[[UIApplication sharedApplication] setStatusBarOrientation:[UIDevice currentDevice].orientation animated:NO];
It appears these alert views orient themselves based on the status bar (whether status bar is visible or not)