最近遇到這樣的一個問題,從伺服器上返回的字串是經過壓縮的。下面記錄下解決方案//// ViewController.m// 字串解壓縮//// Created by 杜甲 on 14-5-8.// Copyright (c) 2014年 杜甲. All rights reserved.//#import "ViewController.h"#import "LFCGzipUtillity.h"@interface ViewController ()@end@implementation
如果覺得在iOS 7啟動期間狀態列黑色不合你意,以下方法可改變Status bar style成白色在工程的plist添加 Status bar style,改變style值預設是Gray style,選擇後面兩個任意一個都可以改變之後啟動圖:更多方法請參考:1.http://stackoverflow.com/questions/17678881/how-to-change-status-bar-text-color-in-ios-72.http://stackoverflow.
ios 設定背景圖片 1.uiscrollview 設定背景圖片// Setup the Scroll ViewUIScrollView*tempScrollView=(UIScrollView*)self.view;tempScrollView.contentSize=CGSizeMake(320,720);// Set Stationary Background, so that while the user scroll the background is// fixed.UIImage*
push頁面時,可調用hidesBottomBarWhenPushed進行隱藏。第一步,我們需要一些圖片:各個選項的表徵圖和tabbar的背景圖片,最後還要一個透明的1x1像素的圖片。第二步,建立一個工程,在工程內建一個繼承於UITabBarController的類。第三步,首先寫一個方法,返回一個UINavigationController-(UINavigationController*) viewControllerWithTitle:(NSString*) title
vcD4KPHAgY2xhc3M9"p1">討論 Discussion斷言評估一個條件,如果條件為 false ,調用當前線程的斷點控制代碼。每一個線程有它自已的斷點控制代碼,它是一個 NSAsserttionHandler 類的對象。當被調用時,斷言控制代碼列印一個錯誤資訊,該條資訊中包含了方法名、類名或函數名。然後,它就拋出一個 NSInternalInconsistencyException 異常。Assertions evaluate a condition and, if the