Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-03-2010, 12:35 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 20
Default UIAlert View shift

In my app i have a UIAlertView with a textfield in it. In portrait the keyboard pops up right under the alert view, but when i switch to landscape half of the alertview is hidden by the keyboard....any ideas

also what is the code snippet i need to make my return button work on my keyboard..i've had trouble with this since the text field is in the alert view.
evfalcon is offline   Reply With Quote
Old 02-03-2010, 12:40 PM   #2 (permalink)
Will Work for Food!
 
itzdark's Avatar
 
Join Date: Apr 2009
Posts: 579
Send a message via AIM to itzdark Send a message via MSN to itzdark
Default

Quote:
Originally Posted by evfalcon View Post
In my app i have a UIAlertView with a textfield in it. In portrait the keyboard pops up right under the alert view, but when i switch to landscape half of the alertview is hidden by the keyboard....any ideas

also what is the code snippet i need to make my return button work on my keyboard..i've had trouble with this since the text field is in the alert view.

Code:
[UIView beginAnimations:@"" context:nil];
    [UIView setAnimationDuration:0.1];
    alertView.transform = CGAffineTransformMakeTranslation(x-distance, y-distance)
    [UIView commitAnimations];
http://www.iphonedevsdk.com/forum/ip...ext-field.html
__________________

Check out my apps

Developers, check out study buddy. I use it everytime I code. It's great for those late night coding sessions.
Unofficial Ad Hoc Distribution Guide || Join my cooperative ad hoc testing group
iSoothe Promotional Video
Contact Me
itzdark is offline   Reply With Quote
Old 02-04-2010, 10:05 AM   #3 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 20
Default

I've decided it would just be easier for my UIalertview to not rotate.. i want the UIalertview to stay in portrait mode and then after the password is entered for the webview to rotate. here is my code..i'm new at this..lol help would be great

- (void)viewDidLoad{


UIAlertView *prompt = [[UIAlertView alloc] initWithTitle:@"Password"
message:@"n/n/n/" // IMPORTANT
delegate:self
cancelButtonTitle:nil
otherButtonTitles:@"Enter", nil];


textField2 = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 25.0)];
[textField2 setBackgroundColor:[UIColor whiteColor]];
[textField2 setPlaceholder:@"password"];
[textField2 setSecureTextEntry:YES];
[prompt addSubview:textField2];

// set place
[prompt setTransform:CGAffineTransformMakeTranslation(0.0, 95.0)];
[prompt show];
[prompt release];


// set cursor and show keyboard

[super viewDidLoad];
webView.scalesPageToFit=YES;
webView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
NSString *pdfPath = [[NSBundle mainBundle] pathForResource:@"2009EVFalcon" ofType:@"pdf"];

/*
If we have to take from its operational directory, then the next 4 lines will be used...

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDire ctory, NSUserDomainMask, YES);
NSString *saveDirectory = [paths objectAtIndex:0];
NSString *saveFileName = @"myPDF.pdf";
NSString *pdfPath = [saveDirectory stringByAppendingPathComponent:saveFileName];
*/
self.pdfUrl = [NSURL fileURLWithPathdfPath];
[webView loadRequest:[NSURLRequest requestWithURLdfUrl]];
}
evfalcon is offline   Reply With Quote
Reply

Bookmarks

Tags
alertview, keyboard, landscape, portrait

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 244
21 members and 223 guests
ADY, Alsahir, beleg_1998, Dani77, diyora, FAED, fredidf, iDifferent, iph_s, JamesCahall, JasonR, mer10, prchn4christ, Rudy, smithdale87, Speed, spiderguy84, stekki, tgjorgoski, timle8n1, twerner
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,755
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:12 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0