码迷,mamicode.com
首页 > 其他好文 > 详细

NSArray使用对象的class方法初始化

时间:2015-10-21 22:42:08      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:

由于NSArray只能存放对象,而每个对象都有class方法。所以可以用每个对象的class方法初始化数组。

比如:

loginAuthClassArray = [[NSArray alloc]  initWithObjects:
                              
                               [ServiceTrackListViewController class],
                               [MYEfubaoViewController class],
                               [MyFavoriteViewController class],
                               [LotteryDealsViewController class],
                               [NewProductConsultantViewController class],
                               [MobilePayQueryViewController class],
                               [MobilePayViewController class],
                               [MobilePayByYiFuBaoViewController class],                                  
                               [OrderSubmitRootViewController class],
                               [HotelOrderListViewController class],
                               [MyTicketListViewController class],
                               [PayServiceQueryViewController class],
                               [ReceiveInfoViewController class],
                               [PayServicePaymentViewController class],
                               [HotelOrderSubmitViewController class],
                               [LotteryPayPageViewController class],
                               [GBPayViewController class],
                               [GBPayByEfubaoViewController class],
                               [GBOrderListViewController class],
                               [SKQRCodeReadController class],
                               [UserConsultantViewController class],
                               [GBPayViewController class],
                               [AllOrderListViewController class],
                               [BrowsingHistoryViewController class],
                               [AddressInfoListViewController class],
                               [UserFeedBackController class],
                               [EvaluationViewController class],
                               [ReturnGoodsQueryViewController class],
                                [UserFeedBackNewViewController class],
                               [NewInviteFriendViewController class],
                               [NewGetRedPackViewController class],
                               [PaymentModeViewController  class], 
                               [MyCouponViewController class],
                                [MyCardViewController class],
                               [AfterSaleViewController class],
                                [ConsultationViewController class],
                               [IWantconsultViewController class],
                               [NewGetRedPackEntryViewController class],
                               [VoiceSignViewController class],
                               NSClassFromString(@"MyIntegralExchangeViewController"),
                               nil];

NSArray使用对象的class方法初始化

标签:

原文地址:http://www.cnblogs.com/zhuzhang/p/4899246.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!