原创 用UIImgeView播放gif圖
RootViewController.m #import "RootViewController.h" @interface RootViewController () 1.創建一個UIImageView的屬性. @prope
原创 UI11_手勢
#import "RootViewController.h" @interface RootViewController () 1.創建一條UIImageView類的屬性 @property(nonatomic, retain
原创 UI_UISegmentedControl
RootViewController.m - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading
原创 UI09_協議控制
簽訂協議,點擊button,來實現改變背景顏色. 創建MyButton類,繼承於NSObject MyButton.h #import <UIKit/UIKit.h> 1.聲明協議 @protocol MyButtonDelega
原创 UI_UIScrollView
RootViewController.m #import "RootViewController.h" 1.創建一個宏. #define WIDTH self.view.frame.size.width #define HEI
原创 UI_UIStepper
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.view
原创 UI_數據處理(txt)
AppDelegate.m #import "AppDelegate.h" @interface AppDelegate () @end @implementation AppDelegate - (void)deall
原创 UI_UITableViewCell自適應高度(圖片,字體)
一.圖片自適應高度 RootViewController.m #import "RootViewController.h" #import "MyCell.h" @interface RootViewController (
原创 UI_UITableView
RootViewController.m #import "RootViewController.h" #define WIDTH self.view.frame.size.width #define HEIGHT self.
原创 UI_UITableView自定義Cell
RootViewController.m #import "RootViewController.h" // 引用頭文件. #import "MyCell.h" #import "YourCell.h" @interface
原创 UI_屬性傳值
RootViewController.m #import "RootViewController.h" #import "SecondViewController.h" @interface RootViewControlle
原创 UI10_UIImageView
1.UIImageView - (void)viewDidLoad { UIImage *image = [UIImage imageNamed:@"1.jpg"]; UIImageView *imageView
原创 UI_UITableView省市區字典數組
RootViewController.m #import "RootViewController.h" #import "SecondViewController.h" @interface RootViewControlle
原创 UI_UISlider
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.view
原创 UI_UITableView界面傳值(將前面的屬性傳值和協議傳值結合起來)
RootViewController.m #import "RootViewController.h" #import "SecondViewController.h" @interface RootViewControlle