본문 바로가기
반응형

전체 글581

Tag를 이용한 delegate 에서의 분기문 http://www.idev101.com/code/User_Interface/UIAlertView.html UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Error" message:@"I'm sorry Dave, I'm afraid I can't do that." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease]; [alert setTag:12]; [alert show]; ... later ... - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex { i.. 2013. 8. 1.
sqlLite 처리 .. AppDelegate *delegate = [[UIApplication sharedApplication] delegate]; sqlite3* db = [delegate GetDB]; sqlite3_stmt *statement = nil; NSString* query =@"update xxx user_tbl "; //=========== update, insert , delete .. if(sqlite3_prepare_v2(db,[query UTF8String],-1, &statement, NULL) == SQLITE_OK) { if(sqlite3_step(statement) == SQLITE_DONE) { sqlite3_reset(statement); } // ======= select if(sqlite.. 2013. 7. 25.
현재 스크린 사이즈 와 회전 상태 파악 CGRect screenBounds = [[UIScreen mainScreen] bounds]; // CGFloat screenScale = [[UIScreen mainScreen] scale]; CGSize screenSize ; bool portraitYN; if (UIDeviceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation])) { screenSize = CGSizeMake(screenBounds.size.width, screenBounds.size.height); portraitYN = YES; //other codes } else { screenSize = CGSizeMake(screenBounds.si.. 2013. 7. 24.
IOS button color Change, round, self.testButton = [UIButton buttonWithType:UIButtonTypeCustom]; self.testButton.backgroundColor = [UIColor redColor]; self.testButton.layer.borderColor = [UIColor blackColor].CGColor; self.testButton.layer.borderWidth = 0.5f; self.testButton.layer.cornerRadius = 10.0f; 2013. 7. 16.
반응형