我拼命想在我的 UICollectionView 上放置一个 UIButton。目标类似于新的foursquare应用程序中的签到按钮。
我的代码目前看起来像这样:
UIButton *floatingButton = [[UIButton alloc] init];
[floatingButton setFrame:CGRectMake(320, 150, 50, 50)];
[floatingButton setBackgroundColor:[UIColor blackColor]];
[self.collectionView addSubview:floatingButton];
[self.collectionView bringSubviewToFront:floatingButton];
问题是按钮不在任何地方。