- 버튼이 파란색으로 나오면...xib에서 버튼의 type을 system이 아닌 custom으로 바꾸어 준다.
- 화면이 위로 밀려올라가 보일때
self.edgesForExtendedLayout = UIRectEdgeNone;
}
- status bar를 표시 안하기
Ready2Read-Info.plist에서 View controller-based status bar appearance를 추가하고 NO로 둔다.
- alertview에 textfield가 표시안될때
if ([myCommon getIOSVersion] >= IOSVersion_7_0) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"FileName", @"")
message:@"" // 중요!! 칸을 내려주는 역할을 합니다.
delegate:self
cancelButtonTitle:NSLocalizedString(@"Cancel", @"")
otherButtonTitles:NSLocalizedString(@"OK", @""), nil];
alert.tag = 1;
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
UITextField *txtFldBookNameLocal = [alert textFieldAtIndex:0];
txtFldBookNameLocal.autocapitalizationType = UITextAutocapitalizationTypeNone;
txtFldBookNameLocal.clearButtonMode = UITextFieldViewModeWhileEditing;
txtFldBookNameLocal.backgroundColor = [UIColor whiteColor];
txtFldBookNameLocal.text =[NSString stringWithFormat:@"%@_%@.txt", strYearMonthDay, strHourMinute];
txtFldBookNameLocal.keyboardType = UIKeyboardTypeDefault;
CGAffineTransform moveUp = CGAffineTransformMakeTranslation(0.0, 0.0);
[alert setTransform: moveUp];
[alert show];
[alert release];
} else {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"FileName", @"")
message:@"\n\n" // 중요!! 칸을 내려주는 역할을 합니다.
delegate:self
cancelButtonTitle:NSLocalizedString(@"Cancel", @"")
otherButtonTitles:NSLocalizedString(@"OK", @""), nil];
alert.tag = 1;
txtFldBookName.text = @"텍스트";
[alert addSubview:txtFldBookName];
[alert show];
[alert release];
}
* tableview의 특정 컨트롤이 속한 cell을 가져오기
ios7부터는 중간에 UITableViewCellScrollView이 하나 더 있기 때문에 superview를 한번더 불러야 한다.
Using iOS 6.1 SDK
-
<UITableViewCell>
-
| <UITableViewCellContentView>
-
| | <UILabel>
Using iOS 7 SDK
-
<UITableViewCell>
-
| <UITableViewCellScrollView>
-
| | <UIButton>
-
| | | <UIImageView>
-
| | <UITableViewCellContentView>
-
| | | <UILabel>
NSString *strTemp = @"";
NSIndexPath *indexPath;
if ([myCommon getIOSVersion] >= IOSVersion_7_0) {
UITableViewCell *cell = (UITableViewCell *)[[[sender superview] superview] superview];
indexPath = [tblViewMain indexPathForCell:cell];
} else {
indexPath = [tblViewMain indexPathForCell:(UITableViewCell *)[[sender superview] superview]];
}
//현재선택한 셀의 줄을 가져온다.
// NSIndexPath *indexPath = [tblViewMain indexPathForCell:(UITableViewCell *)[[sender superview] superview]];
strTemp = [[self.arrDicSetting objectAtIndex:indexPath.section] objectAtIndex:indexPath.row];
'IT > iOS' 카테고리의 다른 글
문자열 처리하기 (0) | 2013.11.23 |
---|---|
iOS7에서 asset catalog를 이용한 Lite버전의 App Icon 설정하기 (0) | 2013.09.29 |
[regularExpression(정규표현식) replace multiple new lines into one new line(여러줄을 한줄로 바꾸기) (0) | 2013.08.04 |
UISlider에 이미지 붙히기 (0) | 2013.05.12 |
아이폰 UI 싸이즈 (0) | 2013.05.12 |