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-08-2010, 03:31 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 20
Default autorotation and a alertview

I start my app with a UIalertview which is a password screen.

1.my return key dosen't work on my keyboard

2.when I autorotate to landscape my UIalertview box is covered by the keyboard(the UIalertView is centered in the screen)...anyway to shift the UIalertview up?

3.if I return it back to portrait the UIalertview is moved(centered) where is is also covered by the keyboard.

4.I am also trying to find some way to search my uiwebview/pdf so any help with this would be appreciated

here is my code..please help lol..i've been losing my mind with this...Thanks......


#import "YearbookViewController.h"
@implementation YearbookViewController

@synthesize webView, pdfUrl;

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIIn terfaceOrientation)interfaceOrientation {
return YES;
}


- (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, 115.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 fileURLWithPath:pdfPath];
[webView loadRequest:[NSURLRequest requestWithURL:pdfUrl]];
}


- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if ([textField2.text isEqualToString: @"MyPassword"]) {
}
else{
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, 115.0)];
[prompt show];
[prompt release];


// set cursor and show keyboard
[textField2 becomeFirstResponder];
}

}



- (void)dealloc
{
[webView release];
[pdfUrl release];
[super dealloc];
}
@end





anyone have any ideas? anything??????

Last edited by evfalcon; 02-18-2010 at 10:26 AM.
evfalcon is offline   Reply With Quote
Old 02-16-2010, 11:20 AM   #2 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 20
Default

anyone?!?!?!
evfalcon is offline   Reply With Quote
Reply

Bookmarks

Tags
alert view, autorotation, keyboard, webview

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: 351
20 members and 331 guests
ADY, Dani77, Duncan C, e2applets, Herbie, JasonR, keeshux, linkmx, mer10, Monstertaco, piesia, prchn4christ, Promo Dispenser, Robiwan, sebasx, sly24, Touchmint, twerner, zulfishah
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,760
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:36 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0