UzysSpringBoardView is UI component which is similar to the iOS HomeScreen(also known as SpringBoard)
- Add Item dynamically
- Move & reorder Items by drag & drop between several pages.
- Delete item
-
Drag the 'UzysSpringBoard' forder into your project (UzysSpringBoardItem.h/m , UzysSpringBoardView.h/m)
-
If you want know which item is removed, reordered, you should use UzysSpringBoardViewDelegate on ViewController
-
Initialize UzysSpringBoardView
gridView =[[UzysSpringBoardView alloc ] initWithFrame:self.view.frame numOfRow:3 numOfColumns:3]; gridView.delegate =self;
-
Add Items
for(int i=0;i < 50;i++) { UzysSpringBoardItem *tmp=[[[UzysSpringBoardItem alloc] initWithFrame:CGRectNull] autorelease]; tmp.textLabel.text=[NSString stringWithFormat:@"Index %d",i]; if(i==1) tmp.deletable = NO; [gridView insertItem:tmp]; }
-
in order to update uiview you should call reloadData
[gridView reloadData];