iphone-common-codes-ccteam源代码 CCUITextField.m
来源:互联网 发布:空间数据库 吴信才 编辑:程序博客网 时间:2024/05/29 18:41
//// CCUITextField.m// CCFC//// Created by xichen on 11-12-28.// Copyright 2011 ccteam. All rights reserved.//#import "CCUITextField.h"@implementation UITextField(cc)// create a common textField+ (UITextField *)createCommonTextField:(CGRect)rect{ UITextField *textField = [[UITextField alloc] initWithFrame:rect]; textField.backgroundColor = [UIColor whiteColor]; return [textField autorelease];}// set the clear button status- (void)addClearButton{ [self setClearButtonMode:UITextFieldViewModeAlways];}// add a leftView- (UILabel *)addLeftview:(CGRect)leftViewRect text:(NSString *)text{ UILabel *label = [[UILabel alloc] initWithFrame:leftViewRect]; label.text = text; label.backgroundColor = [UIColor clearColor]; label.textColor = [UIColor grayColor]; self.leftViewMode = UITextFieldViewModeAlways; self.leftView = label; self.borderStyle = UITextBorderStyleRoundedRect; [label release]; return label;}// add a leftView by a label- (void)addLeftview:(UILabel *)label{ label.backgroundColor = [UIColor clearColor]; label.textColor = [UIColor grayColor]; self.leftViewMode = UITextFieldViewModeAlways; self.leftView = label; self.borderStyle = UITextBorderStyleRoundedRect;}@end
可能有更新:
googlecode链接地址:http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCUITextField.m
github地址: https://github.com/cxsjabc/iphone-common-codes-ccteam/tree/master/CCFC/files/CCUITextField.m
- iphone-common-codes-ccteam源代码 CCUITextField.m
- iphone-common-codes-ccteam源代码 CCUITextField.h
- iphone-common-codes-ccteam源代码 CCAddressBook.m
- iphone-common-codes-ccteam源代码 CCAutoDisappearView.m
- iphone-common-codes-ccteam源代码 CCBaseTipView.m
- iphone-common-codes-ccteam源代码 CCCALayer.m
- iphone-common-codes-ccteam源代码 CCCamera.m
- iphone-common-codes-ccteam源代码 CCCommon.m
- iphone-common-codes-ccteam源代码 CCCompile.m
- iphone-common-codes-ccteam源代码 CCConfig.m
- iphone-common-codes-ccteam源代码 CCContact.m
- iphone-common-codes-ccteam源代码 CCDelete.m
- iphone-common-codes-ccteam源代码 CCDepend.m
- iphone-common-codes-ccteam源代码 CCDylib.m
- iphone-common-codes-ccteam源代码 CCEmoji.m
- iphone-common-codes-ccteam源代码 CCEncoding.m
- iphone-common-codes-ccteam源代码 CCFile.m
- iphone-common-codes-ccteam源代码 CCFileName.m
- Delphi开发经验谈(转)
- WebService 的创建及安全调用
- 简单实用的铁道部12306.cn网站自动化登录
- 用 C++ 实现 C# 中的 委托/事件 (1-delegateEMU.cpp)
- 八款开源 Android 游戏引擎 (巨好的资源)(转)
- iphone-common-codes-ccteam源代码 CCUITextField.m
- iphone-common-codes-ccteam源代码 CCUITextView.h
- 使用tcpdump抓取HTTP包
- ExtJs 快捷键功能添加
- UTF8ToGB
- VC++ 界面编程
- [SCOI2005]扫雷Mine
- VB工程6---圆周长和面积
- WordPress内外网访问的问题解决