访问对象方法比较

    //这种写法明显不如下面的写法安全
//    [[self.staticDragViews objectAtIndex:dragView.tag] setAlpha:0.5];
    
//安全的写法 TKDragView
*staticDragView = (TKDragView*)[self.staticDragViews objectAtIndex:dragView.tag]; if (staticDragView)[staticDragView setAlpha:0.3];

 

posted @ 2013-06-29 22:04  ygm900  阅读(140)  评论(0编辑  收藏  举报