iOS按钮菜单

使用collectionView实现,根据数组个数实现item个数,使用简单,几行代码即可。demo地址

CarouselMenuView *view = [[[NSBundle mainBundle] loadNibNamed:@"CarouselMenuView" owner:self options:nil] lastObject];

  view.dataArray =array;

  view.delegate = self;

   view.frame = CGRectMake(0, 64, [[UIScreen mainScreen] bounds].size.width, 200);

   [self.view addSubview:view];

效果图如下:

你可能感兴趣的:(iOS按钮菜单)