[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
Tuesday, January 25, 2011
Csak az egyik cella ne legyen kijelolve touch-nal
Magan a UITableView-n bekapcsolhatjuk a "Show Selection On Touch"-ot az IB-ben, de ha az egyik cellanal megsem akarunk selection-t, akkor amikor azt letrehozzuk a tableView:cellForRowAtIndexPath:-ban akkor be kell allitani rajta a UITableViewCellSelectionStyleNone-t:
Labels:
selection,
UITableView,
UITableViewCell
Wednesday, January 19, 2011
presentModalViewController:animated: es dismissModalViewControllerAnimated:
Mindig a pushViewController:animated:-et es a popViewControllerAnimated:-et hasznaltam, pedig neha jol helyettuk a presentModalViewController:animated: es dismissModalViewControllerAnimated:
Peldaul amikor sajat AVPlayer vagy AVRecorder view-t akarok megmutatni. Igy legalabb nem kell rejtegetni kulon a navigationBar-t.
Tuesday, January 18, 2011
NSStringFromCGRect
Ha CGPoint-ot akarok logolni, akkor:
NSLog(@"%@", NSStringFromCGPoint(cgPoint));
Ha meg CGRect-et akkor:
NSLog(@"%@", NSStringFromCGRect(cgRect));
Labels:
log,
NSLog,
NSStringFromCGPoint,
NSStringFromCGRect
Monday, January 17, 2011
1 touch vagy tobb
Mashogy kellett lekezelni a sima touch-ot a UIView-n es mashogy a dupla touch-ot. Itt a megoldas (innen):
switch (tapCount) {
case 1:
[self performSelector:@selector(singleTapMethod) withObject:nil afterDelay:.4];
break;
case 2:
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(singleTapMethod) object:nil];
[self performSelector:@selector(doubleTapMethod) withObject:nil afterDelay:.4];
break;
case 3:
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(doubleTapMethod) object:nil];
[self performSelector:@selector(tripleTapMethod) withObject:nil afterDelay:.4];
break;
case 4:
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(tripleTapMethod) object:nil];
[self quadrupleTap];
break;
default:
break;
}
Ami persze a touchesEnded:withEvent-be megy.
Subscribe to:
Posts (Atom)