I have a uitextview that working fine on iOS 4 and when i passed to iOS 5 the keyboard does not shown.
if i add : [self.view.window makeKeyAndVisible];
==>- (void)textViewDidBeginEditing:(UITextView *)textView ---> run
else
not
but since i passed to iOS 5 (simulator/device) the keyboard does not shown.
Can someOne help?
Related
UIView of my app appears fine in ios6 but when it comes to ios7 the entire view is distorted. In ios7 the whole view is lifted upwards.
EDIT :
Then I applied this code:
float SystemVersion=[[[UIDevice currentDevice] systemVersion] floatValue];
if(SystemVersion<7.0f)
{
//Currently your app is running in IOS6 or older version. So you need not to do anything.
}
else
{
// Currently your app is running in IOS7. Do the following.
CGRect TempRect;
for(UIView *sub in [[self view] subviews])
{
TempRect=[sub frame];
TempRect.origin.y+=20.0f; //Height of status bar
[sub setFrame:TempRect];
}
}
but still there is no change. How do I resolve this?
Try this way..
IOS & DISPLAY
OR
This..
Status Bar Issue
This way make the your All subviews as +20 pixels i.e.Increase the +20 of y-axis for all views
Set the deleta for the ios 7. so, it will display the good in both ios 6 & 7.
//Give it frame if navigation bar and status bar both displaying on screen
// first check if device have ios 7
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(#"7.0"))
{
self.view.frame=CGRectMake(0,64,320,self.view.height);
}
try my answer...write that code in ViewdidLoad method..
Status Bar issue
Happy Coding!!!
Please see below note
Using xcode 5,
click on xib,Go to file inspector and change setting as below
Deployment target as ios 7
here,You need to crate two xib view based on view as ios 7 and later and view as ios 6 and earlier and white condition based on xib call
Define below code in .m file
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
if view as IOS 7.0 and later
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(#"7.0"))
//Here call ios 7 xib
}else{
//Here call ios 6 and earlier xib
}
You have to create two xib for ios6 and ios7.
than You have to check condition if device is of ios7 than call ios7 xib otherwise go for ios6.
I am using xcode 5. when i was run app from xcode 5 for ios 6.1 simulator then scroll view doesn' see. for ios 7.0 simulator .Before it was working. I am using interface builder
You can see in following image.....
In ios 7.0 simulator it is working
In ios 6.1 simulator It is Totally white
![It is totally White][2]
In my scroll view view controller in viewDidLoad method i have write below code
[scrollView removeFromSuperview];
[self.view addSubview:scrollView];
When I comment above code then scrollview is visible For ios 6.1 simulator
![enter image description here][3]
Seriously I dont know what is the actual reason? is that above reason or not. In xcode 4.6 it was working .Also my app is live on appstore . Please help me .
Thanks in advance
Seems that You have issue with memory management or with position/size of scrollView. Try to set breakpoint and check what heppends with Your object.
#Kalpesh its simply because removeFromSuperview doesn't work in iOS 7. So your scrollView was not removed (if you had touched the screen it would have crashed). But [scrollView removeFromSuperView]; removed the scrollView in iOS 6 .
My app is compiled against iOS 6 SDK (haven't gotten the time to upgrade to iOS 7 SDK). So I just noticed that the Default image is overlapped by the status bar. This seems to happen only in the "multi-tasking" view but not when resuming my app from background for some reason.
See this image:
I don't think many people will notice this at all.
However, as far as I know you could possibly disable the Statusbar when the app gets in backround.
To do this just use this method in the delegate:
- (void)applicationWillResignActive:(UIApplication *)application {
//code to disable statusbar
}
In the applicationDidBecomeActive method you could enable the statusbar again.
- (void)applicationDidBecomeActive:(UIApplication *)application {
//code to enable the statusbar
}
Furthermore you can take a look at this previous asked question: Status bar won't disappear
If you got any questions feel free to ask!
edgesForExtendedLayout does the trick for iOS 7. However, if you build the app across iOS 7 SDK and deploy it in iOS 6, the navigation bar appears translucent and the views go beneath it. So, to fix it for both iOS 7 as well as for iOS 6 do this:
self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
if ([self respondsToSelector:#selector(edgesForExtendedLayout)])
self.edgesForExtendedLayout = UIRectEdgeNone; // iOS 7
I have a popover in an app and it doesn't resize to what I set. I found this but it still doesn't work in iOS 5.1. I switched to the ios 5.0 simulator and it worked again. Am I missing something?
EDIT
In viewDidLoad:
self.contentSizeForViewInPopover = CGSizeMake(320.0, 137.0);
In viewDidAppear:
self.popoverController.popoverContentSize = CGSizeMake(320.0, 137.0);
Looks like it has to be a "bug" or a change in iOS 5.1. Apple's sample code does not do a popover in a splitview. I have disabled the swipe gesture though by calling setPresentsWithGesture on the splitViewController. It is annoying swiping and having the master view come up.
I have a an app which has worked perfectly well until the release of IOS 5. I've managed to fix most of the problems caused by the upgrade but I cannot get the keyboard to retract. My other apps manage to do it ok under IOS 5 but I'm missing something with this app. The app scrolls though a large Pdf and the textField is to take the user to a specific page. When the keyboard appears it covers the textField and only the Pdf is visible. Under 4.2 the keyboard retracts when the Pdf is pressed but that doesn't work with IOS 5. I'm using the code below but it doesn't get called, whereas in my other apps which retract the keyboard successfully the code is called, what am I missing.
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
if(textField == pageNo){
[pageNo resignFirstResponder];
}
return YES;
}
Quick fix idea? put this in the pdf view touch handler?
if ([pageNo isFirstResponder]) [pageNo resignFirstResponder];