ブロックノート

、リストはタイプリストで、UserRepeatClickSelectIndexBlockは自己を保持し、UserRepeatClickSelectIndexBlockを開催しますstrongselfここで使用することはできませんし、自己がメモリリークにつながることができ、自己のタイプリストを保持します   

 

typeof演算(自己)__weak weakself =自己。

        _typeList = [[ChooseEventList ALLOC] initWithFrame:CGRectMake(0、0、YDScreenSize()幅、DWF(45)。)itemInfoArray:self.indexPageTypeList.copy configurationBlock:^(ChooseEventList *リスト){

            typeof演算(weakself)__strong strongself = weakself。

            [リストsetUserRepeatClickSelectIndexBlock:^(ChooseEventList *リスト、NSInteger chooseIndex){

                スイッチ(weakself .indexPageTypeList [chooseIndex] .integerValue){

                    ケースYDIndexPageExamination:

                    ケースYDIndexPageWookShop:

                    {

                        [setSelectedIndex weakself:chooseIndex]。

                    }

                        ブレーク;

                    デフォルト:

                        ブレーク;

                }

            }]。

        }]。

おすすめ

転載: www.cnblogs.com/yuxiaoyiyou/p/11760492.html