- 博客(19)
- 资源 (1)
- 收藏
- 关注
原创 iOS7下變更狀態欄文字顏色
1. 在plist配置文件中View controller-based status bar apperance設定為YES2. 在viewDidLoad方法中,添加[self setNeedsStatusBarApperanceUpdate]3. 添加方法- (UIStatusBarStyle)preferredStatusBarStyle{return UIStatusBa
2013-12-10 14:59:46 487
原创 ASIHTTPRequest發送異步請求方法之一
下載ASIHTTPRequest加入Framework: CFNetwork.framework,SystemConfiguration.framework,MobileCoreServices.framework__block ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:sourceURL];[request se
2013-09-30 10:04:59 406
原创 UIScrollView聯動
#pragma mark UIScrollViewDelegate- (void)scrollViewDidScroll:(UIScrollView *)scrollView{ if (scrollView == theScrollView) { [theScrollView_1 setDelegate:nil]; [theScrol
2013-09-06 16:17:48 763
原创 獲取UIWebView內部HTML內容
thisURL = document.URL;thisHREF = document.location.href;thisSLoc = self.location.href;thisDLoc = document.location;thisTLoc = top.location.href;thisPLoc = parent.document.location;thisTHo
2013-09-04 10:55:19 462
原创 NSCFDictionary
[NSCFDictionary setObject:forKey:] mutating method send to immutating object修改方法:NSMutableDictionary *dict = [[NSUserDefaults standardUserDefaults] objectForKey:@"dict"];為:NSMutableDictionary
2013-08-16 11:34:28 1233
原创 處理URL特殊字符
NSString* escaped_value = (NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, /* allocator */ (CFStringRef)value,
2013-08-15 11:48:58 430
原创 在圖片上覆蓋顏色
- (UIImage *)image:(UIImage *)argImage thintedWithColor:(UIColor *)argColor{ if (argColor != nil) { UIGraphicsBeginImageContext([argImage size]); CGContext
2013-08-13 16:20:32 493
原创 在GridView控件中刪除數據
添加一個CommandField列并指明為“刪除”按鈕(默認為LinkButton按鈕),單擊該按鈕時將觸發RowDeleting事件。例如:protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e){ string sqlStr = "delete from tb_
2013-03-13 10:29:06 695
原创 設置GridView控件的數據顯示格式
設置GridView控件中指定列的數據顯示格式,主要在RowDataBound事件中實現。當數據源綁定到GridView控件中的每行時,將觸發該控件的RowDataBound事件。修改或設置綁定到該行的數據的顯示格式,可以使用RowDataBound事件的GridViewEventArgs e參數的Row屬性的Cells屬性定位到指定單元格,然後通過String類的Format方法將格式化后的數據
2013-03-13 10:16:07 661
原创 在GridView中,中高亮顯示光標所在行
protected void GrieView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("onmouseover"
2013-03-13 10:00:53 517
原创 常用正則表達式
1. 驗證電子郵件\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*\S+@\S+\. \S+ 2. 驗證網址HTTP: //\S+\. \s+http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)? 3. 驗證郵政編碼\d{6} 4. 表示0~9十個數字[0-9]
2013-03-08 09:48:39 420
原创 生成圖片的縮略圖
在上傳圖片時,可以先將圖片進行縮放,然後將其保存到服務器上// 生成縮略圖System.Drawing.Image image, newImage;image = System.Drawing.Image.FromFile(filePath);System.Drawing.Image.GetThumbnaillmageAbort callb = null;newImage =
2013-03-06 09:33:46 397
原创 獲取文件的相關知識
string filePath = FileUpload1.PostedFile.FileName; // 獲取上傳文件的路徑string fileName = filePath.Substring(filePath.LastIndexOf("\\") + 1); // 獲取文件名稱string fileSize = Convert.ToString(FileUpload1.PostedF
2013-03-06 09:29:47 426
原创 設置IE主頁
將LinkButton控件的OnClientClick屬性設置為:"this.style.behavior='url(#default#homepage)'; this.sethomepage('http://www.baidu.com')"
2013-03-05 11:24:47 364
原创 單擊按鈕彈出新窗口
protected void Button1_Click(object sender, EventArgs e){Response.Write("window.open('NewPage.aspx', '', 'width=335,height=219')");} 單擊按鈕關閉protected void Button1_Click(object sender, Event
2013-03-05 11:19:28 495
原创 獲取用戶語言配置信息
獲取用戶預言配置[[[NSUserDefaultsstandardUserDefaults] objectForKey:@"AppleLanguages"]objectAtIndex:0];
2013-02-05 16:48:10 196
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人