iOS buttonWithType:101 苹果私有api

无意中发现,有人创建UIButton这样写

UIButton *previousButton = [UIButtonbuttonWithType:101];

一看原来是私有api

    UIButton *previousButton = [UIButton buttonWithType:101];
    [previousButton setTitle:@"<" forState:UIControlStateNormal];
    previousButton.frame = CGRectMake(0.f, 0.f, 30.f, 80.f);
    previousButton.center = CGPointMake(previousButton.frame.size.width / 2.f, pagingView.center.y);
    [previousButton addTarget:pagingView action:@selector(scrollToPreviousPage) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:previousButton];

  

 

更多UIButton 私有api

http://www.yifeiyang.net/iphone-development-skills-of-the-private-api-3-uibutton/

 

posted @ 2013-10-23 14:36  cocoajin  阅读(667)  评论(0编辑  收藏  举报