Open pzmudzinski opened 12 years ago
Hi, you can modify the openSringBoardLoadIconArray delegate method to specify the page size (the example shows 9 icons per page) and if you supply more than this number of icons in the delegate, the page methods will be employed. Currently, this defaults to horizontal scrolling as with the standard Spring Board.
Please note, iOS6 will support a more robust standard way to handle collections.
Thank you for answer. However I still need some help. I changed openSpringBoardLoadIconArray method to this:
(NSMutableArray ) openSringBoardLoadIconArray:(OpenSpringBoard )openSringBoardVC iconPageLimit:(int *)numIcons { // Create an array of icons programmatically
NSDictionary *d; itemArray = [[[NSMutableArray alloc] initWithCapacity:18] autorelease];
addIcon(@"tool_calendar_JAN.png",@"January",@"1") addIcon(@"tool_calendar_FEB.png",@"February",@"2") addIcon(@"tool_calendar_MAR.png",@"March",@"3")
addIcon(@"tool_calendar_APR.png",@"April",@"4") addIcon(@"tool_calendar_MAY.png",@"May",@"5") addIcon(@"tool_calendar_JUL.png",@"January1",@"6")
addIcon(@"tool_calendar_FEB.png",@"February1",@"7") addIcon(@"tool_calendar_OCT.png",@"March1",@"8") addIcon(@"tool_calendar_APR.png",@"April1",@"9")
addIcon(@"tool_calendar_SEP.png",@"May1",@"10") addIcon(@"tool_calendar_AUG.png",@"January2",@"11") addIcon(@"tool_calendar_NOV.png",@"February2",@"12")
addIcon(@"tool_calendar_DEC.png",@"March2",@"13") addIcon(@"tool_calendar_APR_ON.png",@"April2",@"14") addIcon(@"tool_calendar_AUG_ON.png",@"May2",@"15")
*numIcons = 9;
return itemArray; }
which gives me this: http://www.imagebanana.com/view/wa7dltl4/iOSSimulatorScreenshot2012062507.24..png
I can't scroll pages, there's no page control and icons overlap of each other. How to do this properly?
I also noticed in OpenSpringBoard.m in buildIconViews code like this: if (page==1) { [self.view addSubview:view]; // [pageOne addSubview:view]; } else { [self.view addSubview:view]; // [pageTwo addSubview:view]; }
I'm confused - is it a right code?
I can't scroll pages, there's no page control and icons overlap of each other. How to do this properly? I'm confused - is it a right code? The general case of an arbitrary number of "pageN" subviews was not yet pushed. The specific case of two subview "pages" (ie., pageOne, pageTwo) is hinted at in the comments.
Perhaps you can contribute a general case of an arbitrary ([itemArray count] % numIcons == pageCount) number of pages to this project?
So make me sure - OpenSpringBoard is currently working only for one page ?
Just pushed code for a static two-page case, it should be trivial to extend this to the dynamic multipage case.
However, the icon reordering currently does not work across multiple pages!
Ok, got it... guess we'll need to use UICollectionView eventually but I am looking for something similar for older iOS
On openpsringboard screenshot there's a PageControl used on bottom - is it included in source? Is openspringboard even handling more than one page of icons? How to set more than one page of icons and scroll between them horizontally? Thanks!