今天劉國斌老師講了關於怎麼編輯圖片的各種板式,如何把代碼裡的資料轉成data再存到本地的檔案,之後再取出來用 。感覺這些比較難理解,課後也是用好多的事件進行練習,今天上午同樣講了怎樣建立一個伺服器,去核多個人共同去開發一個項目,實現多人的檔案同步,這些感覺很受用。
劉老師在這段時間講課很細緻,可能知道這段的內容比較重要,個人感覺現在學得東西雖然不多,但是很重要,基礎一定要打好。
整理了今天的痛點
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
// ---------------------- 功能分區 -----------------------------
// 把系統準備的導航控制器賦值給自己聲明的屬性
// 如果不把他提前聲明一個navigationController的屬性在這裡接住它,那麼在剩下面的doneAction/的按鈕點擊事件裡取不到一個導航控制器push到新的頁面,
self.ng=navigationController;
//設定系統頁面顯示圖片的控制項的尺寸 不然的話會被自己添加的控制項蓋上
UIView *puView = [viewController.view.subviews firstObject];
CGRect frame = puView.frame;
frame.size.height = 567;
puView.frame = frame;
// ---------------------- 功能分區 ----------------------------
self.vv=[[UIView alloc]initWithFrame:CGRectMake(0, 560, 375, 100)];
self.vv.backgroundColor=[UIColor redColor];
[viewController.view addSubview:self.vv];
self.sv = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 20, 375, 80)];
self.sv.backgroundColor = [UIColor blueColor];
[self.vv addSubview:self.sv];
UIButton *doneBtn = [[UIButton alloc]initWithFrame:CGRectMake(325, 0, 50, 20)];
[doneBtn setTitle:@"Done" forState:UIControlStateNormal];
[self.vv addSubview:doneBtn];
[doneBtn addTarget:self action:@selector(doneAction) forControlEvents:UIControlEventTouchUpInside];
}
|