最新文章列表

[IOS]textView自动滚动到底部

UITextView text content doesn't start from the top   参考:https://stackoverflow.com/questions/26835944/uitextview-text-content-doesnt-start-from-the-top   我使用的是这种方法: override func viewWillAppear ...
繁星水 评论(0) 有1448人浏览 2017-09-19 17:08

自己总结的类目Category

-------------------------给UILabel设置字体,font---------------------------------- #import <UIKit/UIKit.h>   #pragma mark ======自带的根据url获取image的方法======= @interface UIImageView (DispatchLoad) - ...
zjjzmw1 评论(0) 有2135人浏览 2014-05-05 10:52

TextView添加placeholder属性

@interface SSTextView : UITextView  {     BOOL _shouldDrawPlaceholder; }     /**  The string that is displayed when there is no other text in the text view.    The default value is `nil`.  * ...
zjjzmw1 评论(0) 有2709人浏览 2014-04-11 12:21

ios 弹出键盘上面带UITextView 的评论界面

.h里面写的两个属性。 //评论的时候弹出来的。 @property (retain, nonatomic) UIView *mainView;   @property (retain, nonatomic) UITextView *myTextV1;   ViewDidLoad 里面写的。 [[NSNotificationCenterdefaultCenter] addObserv ...
zjjzmw1 评论(0) 有2742人浏览 2013-11-01 10:38

UITextView 带有PlaceHolder

#import <UIKit/UIKit.h> #import <Foundation/Foundation.h> @interface UIPlaceHolderTextView : UITextView @property (nonatomic, retain) NSString *placeholder; @property (nonatomic, r ...
xyxdasnjss 评论(0) 有1459人浏览 2013-07-31 13:23

设置UITextView的圆角

一般情况下,我们看到的UITextView都是方角的:   将UITextView的方角转成圆角:   #import <QuartzCore/QuartzCore.h> [self.textView.layer setCornerRadius:10]  
jsntghf 评论(0) 有1449人浏览 2013-06-02 15:39

UITextView

 一开始用UILineBreakModeWordWrap时,发现中英文混合,用sizeWithFont高度不是很精确;后来改为UILineBreakModeCharacterWrap就OK了; 下面是UILineBreakMode的说明:   typedef enum {   UILineBreakModeWordWrap = 0,   UILineBreakModeCharacte ...
quding0308 评论(0) 有2175人浏览 2012-12-24 13:47

IOS之UILabel显示内容自动换行

1、UILabel内容自动换行 UIFont *fontName = [UIFont systemFontOfSize:16.0f]; //定义字体大小 CGSize sizeName = [orderFood.food_name sizeWithFont:fontName constrainedToSize:CGSizeMake(130.0f,MAXFLOAT) lineBreakMod ...
ytwhw 评论(1) 有9232人浏览 2012-12-18 14:45

UILabel UITextField UITextView区别

UILabel 显示的文本只读,无法编辑,可以根据文字个数自动换行; UITextField 可编辑本文,但是无法换行,只能在一行显示;当点击键盘上的return时会收到一个事件做一些事情。 UITextView 可编辑文本,提供换行功能。
quding0308 评论(0) 有6718人浏览 2012-12-04 14:37

UITextView高度自适应

HPTextViewInternal.h   #import <UIKit/UIKit.h> @interface HPTextViewInternal : UITextView { } @end   HPTextViewInternal.m   #import "HPTextViewInternal.h" @imple ...
jsntghf 评论(0) 有6427人浏览 2012-09-30 15:12

iOS:UITextView中return key点击事件的监听方法

可以这样解决,在- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text中监听replacementText,如果为回车则将键盘收起     - (BOOL)textView:(UITextView *)textView sh ...
Hobo86 评论(0) 有19177人浏览 2012-05-19 11:23

UITextView限制输入长度

例如限制只能输入150个字符,可以通过UITextViewDelegate中的- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;来实现。   - (BOOL)textView:(UITextView *)textView s ...
jsntghf 评论(0) 有3793人浏览 2012-03-22 08:10

改变UITextView的高度

有一个320*480的UITextView,点击UITextView的时候,下面的部分会被弹出的软键盘挡住,我们可以将UITextView的高度改为480 - 软键盘的高度,关闭软键盘后,高度恢复为原始高度。   - (void)viewDidLoad { [super viewDidLoad]; self.textView = [[UITextView alloc] initW ...
jsntghf 评论(0) 有3702人浏览 2012-01-18 22:20

实现对UITextField ,UITextView等输入框的 字数限制

1.     如何实现对UITextField ,UITextView等输入框的 字数限制        (1)首先,肯定要 让controller 实现 UITextFieldDelegate (针对UITextField)或者  UITex ...
zhboy666666 评论(0) 有3979人浏览 2011-12-08 18:30

UITextView自定义文字选择后的菜单

- (void)viewDidLoad { [super viewDidLoad]; UIMenuItem *menuItem = [[UIMenuItem alloc] initWithTitle:@"分享到新浪微博" action:@selector(shareSina)]; UIMenuController *menu = [UIMenuController s ...
jsntghf 评论(0) 有3577人浏览 2011-11-24 09:27

UITextView显示HTML内容,实现显示不同的字体和文字颜色

[textView setContentToHTMLString:txtStr];   <html> <head> </head> <body> <img src = "http://t1.baidu.com/it/u=1075557596,3331641536&fm=15&gp=0.jpg& ...
374016526 评论(1) 有5710人浏览 2011-08-25 11:05

最近博客热门TAG

Java(141744) C(73651) C++(68608) SQL(64571) C#(59609) XML(59133) HTML(59043) JavaScript(54919) .net(54785) Web(54514) 工作(54118) Linux(50905) Oracle(49875) 应用服务器(43289) Spring(40812) 编程(39454) Windows(39381) JSP(37542) MySQL(37267) 数据结构(36424)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics