日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

2.12-3.20上周的习惯坚持下来了✌️精诚所至金石为开,加油兄弟

發(fā)布時間:2023/12/15 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 2.12-3.20上周的习惯坚持下来了✌️精诚所至金石为开,加油兄弟 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

妹妹婚禮,祝福妹妹,幸福的新娘子,下周yy過來,但是任務(wù)比較重,跟同事搞好關(guān)系,跟峰哥商量好,要是實在不行,找人幫忙搞一下,周末沒辦法加班了

block反向傳值,代替代理跳轉(zhuǎn)弄明白了,在pop的時候調(diào)用dealloc說明控制器沒有內(nèi)存泄露

QQ好友列表,點擊headerView收起分組,使用block替換代理,

遇到崩潰的問題,exc_bad_access?

野指針

正確的使用步驟:

1.在headerView的類中聲明一個block屬性,

//? HeaderView.h

typedef void(^headerViewClicked)();

@interface HeaderView : UITableViewHeaderFooterView

@property (nonatomic, copy) headerViewClicked headerClicked;

2.在點擊headerView調(diào)用的方法中執(zhí)行block?? headerClicked()

//? HeaderView.m

UITapGestureRecognizer *tapGest = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(headerViewDidClicked:)];//headerViewDidClicked:用Block屬性

-(void)headerViewDidClicked:(headerViewClicked)headerViewClicked {

? ? //--------------用block方法

//? ? _headerClicked = headerViewClicked; // 沒有賦值,不能使用,會崩潰

? ? //----------用block屬性 之前block已經(jīng)賦值好

? ? self.sectionNameModel.showCell = !self.sectionNameModel.showCell;

? ? if (_headerClicked) {

? ? ? ? _headerClicked();

? ? }

}

?

3.在控制器中給headerView的Block屬性賦值

//? SectionTableViewController.m

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {

? ? HeaderView *headerView = [[HeaderView alloc]init];

? ? headerView.sectionNameModel = self.sectionNameArray[section];

? ? headerView.tag = section;

?? ?

? ? __weak __typeof(self)weakSelf = self;

? ? //------------------------------------用block方法

//? ? NSIndexSet *set = [NSIndexSet indexSetWithIndex:headerView.tag];

//? ? [headerView headerViewDidClicked:^{

//? ? ? ? NSLog(@"*******************");

//? ? ? ? [weakSelf.tableView reloadSections:set withRowAnimation:UITableViewRowAnimationFade];

//? ? }];

?? ?

? ? //------------------------------------用block屬性

? ? NSIndexSet *set = [NSIndexSet indexSetWithIndex:headerView.tag];

? ? headerView.headerClicked = ^(){

? ? ? ? NSLog(@"*******************");

? ? ? ? [weakSelf.tableView reloadSections:set withRowAnimation:UITableViewRowAnimationFade];

?? ? ? ?

? ? };

?? ?

? ? return headerView;

}

?

錯誤的使用步驟:

1.在headerView的類中聲明一個block屬性,

2.在headerView的類中聲明一個帶block的方法,headerViewDidClicked:

3.在點擊headerView調(diào)用的方法(headerViewDidClicked:)中執(zhí)行block?? headerClicked(),修改模型顯示隱藏bool

4.在控制器中調(diào)用headerView的帶Block的方法

?

正確的使用步驟:

1.在headerView的類中聲明一個block屬性,

2.在headerView的類中聲明一個帶block的方法,headerViewDidClicked:

- (void) headerViewDidClicked:(headerViewClicked)headerViewClicked;

3.在點擊headerView調(diào)用的方法(另外一個方法)(showOrHide)中執(zhí)行block?? headerClicked(),修改模型顯示隱藏bool

//? HeaderView.m

UITapGestureRecognizer *tapGest = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(showOrHide)];

?

-(void)headerViewDidClicked:(headerViewClicked)headerViewClicked {?? ?

? ? //--------------用block方法

? ? _headerClicked = headerViewClicked; // 沒有賦值,不能使用,會崩潰

}

?

- (void)showOrHide{ // 用block方法

? ? self.sectionNameModel.showCell = !self.sectionNameModel.showCell;

? ? if (_headerClicked) {

? ? ? ? _headerClicked();

? ? }

}

4.在控制器中調(diào)用headerView帶Block的方法

//? SectionTableViewController.m

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {

? ? HeaderView *headerView = [[HeaderView alloc]init];

? ? headerView.sectionNameModel = self.sectionNameArray[section];

? ? headerView.tag = section;

?? ?

? ? __weak __typeof(self)weakSelf = self;

? ? //------------------------------------用block方法

? ? NSIndexSet *set = [NSIndexSet indexSetWithIndex:headerView.tag];

? ? [headerView headerViewDidClicked:^{

? ? ? ? NSLog(@"*******************");

? ? ? ? [weakSelf.tableView reloadSections:set withRowAnimation:UITableViewRowAnimationFade];

? ? }];?? ?

? ? return headerView;

}

------------------------------------------

git公鑰

svedeMacBook-Air:.ssh sve$ cat id_rsa.pub

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZ3hjA/+E+53hfOV9ufoT5L+bpzQtXjocksgXVq1j4tT9PC1cwe4jg42X+NMFHw/lM9wz6zWknanC+iG4iiT4B5wwybRZ/pBHmiPrkaaGTuo8AqccwekGgMuic9zyhM2u1LbiG8Px5hS1X8ToyOM7tMWpvTW6Tib3nZiSc0R7I6GRE50PJrGC33DBQJT/0gE5WEE82mNzFgXCKZv81fnCriYyySvwLpKmc+GynCWMSoRILjA5+2Yxe07UYVPSzRebfKMr/eEJfwQHY7xWobI4Oa4q9UjbQFUE5f+up18pqxTuz9c28tUSFJqofnsUUZXFmFkdEegaKLw+zkQhqgiCl songximing@haodf.com

svedeMacBook-Air:.ssh sve$?

?

---------------------------------------------------------------------------

[[HDFSearchBarView alloc] initWithFrame:(CGRect){CGPointZero, SCREEN_WIDTH, 44} delegate:self]

--------

Bundle?

?

-----------------------------------------------------------------------------------------------------

粗心的錯誤,textField一直出不來,后來發(fā)現(xiàn)黃色的寫成了backGroundView ,給backGroundView 加約束

UITextField *telInputTextField = [[UITextField alloc]init];

? ? [backGroundView addSubview:telInputTextField];

? ? [telInputTextField mas_makeConstraints:^(MASConstraintMaker *make) {

? ? ? ? make.top.equalTo(backGroundView.mas_top);

? ? ? ? make.bottom.equalTo(backGroundView.mas_bottom);

? ? ? ? make.left.equalTo(phoneLabel.mas_right).offset(0);

? ? ? ? make.right.equalTo(backGroundView.mas_right).offset(-10);

? ? }];

-----------------------------------------------------------------------------------------------------

三個大view一直出不來

----------------------------------------------------------------------------------------------------

block反向傳值后,直接跳轉(zhuǎn)了控制器,沒停留,舊代碼沒刪除

在第二個控制器定義block屬性,在點擊方法中執(zhí)行這個Block

在第一個控制器中給block賦值

----------------------------------------------------------------------------------------------------

textField收起

leeGof

------------------------------------------------------------------------------------------------

上面的寫法不能設(shè)置按鈕的文字,必須用下面的Set方法才能設(shè)置按鈕文字

//? ? hdfServeAgreementButton.titleLabel.text = @"好大夫服務(wù)協(xié)議";

? ? [hdfServeAgreementButton setTitle:@"好大夫服務(wù)協(xié)議" forState:UIControlStateNormal];

------------------------------------------------------------------------------------------------

loadView

storyBoard

.xib

viewController.xib

空view

所以得干掉xib才能不顯示xib

?

?

-----

?//? ? if (self.isFromAddNewPatient) {

? ? ? ? myPatientId = self.patientInfoView.patientModel.patientId;

? ? ? ? //? ? }else{

? ? ? ? //? ? ? ? myPatientId = self.patientModel.patientId;

? ? ? ? //? ? }

干啥的判斷?是新添加的患者還是從患者列表選選擇的患者

-----

記錄一下:ios 6中以前一直沒注意,textField原來文字默認是頂對齊,額,,用ios 6現(xiàn)在測才發(fā)現(xiàn),,,不居中不好看啊,

?

更改如下:

???[textField?setContentVerticalAlignment:UIControlContentVerticalAlignmentCenter];

?

在pop的時候沒有走dealloc

?

ENFullScreenPicker.h滾輪picker

?

doctorAppDelegate *doctorDelegate = (doctorAppDelegate *)[UIApplication? sharedApplication].delegate; 獲取APPdelegate

雙布爾值搞定,點擊

轉(zhuǎn)載于:https://www.cnblogs.com/tufei7/p/5300442.html

總結(jié)

以上是生活随笔為你收集整理的2.12-3.20上周的习惯坚持下来了✌️精诚所至金石为开,加油兄弟的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。