Swift-(OC中的enumerateObjectsUsingBlock跟Swift的enumerate区别)

OC中使用:

  NSArray * lists = [NSArray array];

    [lists enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {

        

    }];

 

Swift中使用:

  for (index,object) in (lists?.enumerate())! {

   }

posted @ 2016-08-26 14:19  J-Vijay  阅读(342)  评论(0编辑  收藏  举报