摘要:
先添加一个委托_webView.delegate=self;出现if (alertView==nil){ alertView = [[UIAlertViewalloc] initWithTitle:nil message: @"正在讀取網路資料" delegate: self cancelButtonTitle: nil otherButtonTitles: nil]; UIActivityIndicatorView *a... 阅读全文
摘要:
-(IBAction)btnStartClick{ proValue=0; timer = [NSTimerscheduledTimerWithTimeInterval:0.001target:selfselector:@selector(changeProgress) userInfo:nilrepeats:YES];}-(void)changeProgress{ proValue +=1.0; if(proValue > 1500) { //停用计时器 [timer invalidate]; } else { [proView setProgres... 阅读全文
摘要:
thOne=[[NSThreadalloc]initWithTarget:selfselector:@selector(run) object:nil];[thOne start];-(void)run{ //代码} 阅读全文
摘要:
模拟器有这个问题,真机不会,经试验是TextField的Correction属性引起的,把这个属性设为NO就好了 阅读全文
摘要:
挡住的处理事件地址在:http://www.cnblogs.com/fanwa/archive/2012/02/14/2350667.html以下是还原的处理事件:注册监听事件:[[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(keyboardWillBeHidden:) name:UIKeyboardWillHideNotificationobject:nil];事件代码:- (void)keyboardWillBeHidden:(NSNotification*)aNotification { .. 阅读全文
摘要:
新的方式:- (IBAction)textFieldDidBeginEditing:(UITextField *)textField { activeText = textField; [self slideFrame:YES];}- (IBAction)textFieldDidEndEditing:(UITextField *)textField { activeText = nil; [self slideFrame:NO];}-(void) slideFrame:(BOOL) up{ int movementDistance = 0; // twea... 阅读全文