iphone-common-codes-ccteam源代码 CCUIAlertTextView.m
2012-01-06 09:47
323 查看
// // CCUIAlertTextView.m // CCFC // // Created by xichen on 11-12-16. // Copyright 2011年 ccteam. All rights reserved. // #import "CCUIAlertTextView.h" #import <QuartzCore/QuartzCore.h> @implementation CCUIAlertTextView - (id)initWithTitle:(NSString *)title delegate:(id /*<UIAlertViewDelegate>*/)delegate cancelButtonTitle:(NSString *)cancelButtonTitle okButtonTitles:(NSString *)okButtonTitles { if(self = [super init]) { _alertView = [[UIAlertView alloc] initWithTitle:title message:@"\n" delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:okButtonTitles, nil]; _field = [[UITextField alloc] initWithFrame: CGRectMake(12, 45, 260, 25)]; _field.backgroundColor = [UIColor whiteColor]; _field.layer.cornerRadius = 3.0f; _field.layer.borderWidth = 2.0f; _field.delegate = delegate; [_alertView addSubview:_field]; [_field release]; [[UIApplication sharedApplication] setApplicationSupportsShakeToEdit:FALSE]; } return self; } - (void)dealloc { [super dealloc]; } - (void)show { [_alertView show]; [_alertView release]; [_field becomeFirstResponder]; } - (void)drawRect:(CGRect)rect { [super drawRect:rect]; } @end
可能有更新:
googlecode链接地址:http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCUIAlertTextView.m
github地址: https://github.com/cxsjabc/iphone-common-codes-ccteam/tree/master/CCFC/files/CCUIAlertTextView.m
相关文章推荐
- iphone-common-codes-ccteam源代码 CCUIAlertTextView.h
- iphone-common-codes-ccteam源代码 CCUIAlertActivityView.h
- iphone-common-codes-ccteam源代码 CCUIAlertActivityView.m
- iphone-common-codes-ccteam源代码 CCUIAlertView.h
- iphone-common-codes-ccteam源代码 CCUIAlertView.m
- iphone-common-codes-ccteam源代码 CCAutoDisappearView.h
- iphone-common-codes-ccteam源代码 CCAutoDisappearView.m
- iphone-common-codes-ccteam源代码 CCUITableView.h
- iphone-common-codes-ccteam源代码 CCUITableView.m
- iphone-common-codes-ccteam源代码 CCUICalloutView.h
- iphone-common-codes-ccteam源代码 CCUICalloutView.m
- iphone-common-codes-ccteam源代码 CCUIImageView.h
- iphone-common-codes-ccteam源代码 CCUIActivityIndicatorView.h
- iphone-common-codes-ccteam源代码 CCUIImageView.m
- iphone-common-codes-ccteam源代码 CCUIActivityIndicatorView.m
- iphone-common-codes-ccteam源代码 CCAddressBook.m
- iphone-common-codes-ccteam源代码 CCConfig.h
- iphone-common-codes-ccteam源代码 CCFileName.h
- iphone-common-codes-ccteam源代码 CCKeyboard.h
- iphone-common-codes-ccteam源代码 CCMapAnnotation.m