07 2012 档案

iPhone 剪切板的使用
摘要:将内容复制到剪切板上: UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; [pasteboard setString:@"复制内容"]; 阅读全文

posted @ 2012-07-18 11:33 黯夜曦 阅读(578) 评论(0) 推荐(0)

MBProgressHUD覆盖键盘
摘要:正好用到,标记一下!来自:http://www.cnblogs.com/ruiq/archive/2012/04/19/2457702.html发送微博的时候,需要用MBProgressHUD来覆盖窗口等待发送成功,但是无论如何键盘都覆盖不上。于是各种研究,添加到view,添加到window,都无果。。想破了脑子,总觉得加到window都覆盖不了,这个比较奇葩后来突然检查了一下window的count,发现居然有2个window!!!我印象中iphone应该只有一个window啊。。不过隐约想起谁说过iphone有时候会有多个window最后把hud加到了第二个window下,覆盖成功。遍历了 阅读全文

posted @ 2012-07-03 17:46 黯夜曦 阅读(349) 评论(0) 推荐(0)

点击UITextField弹出UIPickerView
摘要:点击UITextField弹出UIPickerView有一些不同的方法,特此标记一下本方法:- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField { UIPickerView *pickerView = [[UIPickerView alloc] init]; [pickerView sizeToFit]; pickerView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHei... 阅读全文

posted @ 2012-07-03 13:59 黯夜曦 阅读(2140) 评论(0) 推荐(0)

在UITextView中添加placeholder
摘要:#import <UIKit/UIKit.h>@interface UIPlaceHolderTextView : UITextView { NSString *placeholder; UIColor *placeholderColor; @private UILabel *placeHolderLabel;}@property (nonatomic, retain) UILabel *placeHolderLabel;@property (nonatomic, copy) NSString *placeholder;@property (nonatomic, ret... 阅读全文

posted @ 2012-07-02 17:01 黯夜曦 阅读(1777) 评论(0) 推荐(0)

导航