TOC (index) appearance
Hi! Is it possible to change appearance of the index.htm file? for ex. now it is flying up from the bottom of the screen. Can it be changed to fly from the left or right side of the screen? And second question is how to change gesture to show/hide it. Is it hard to make option of two finger swipe up to show index and to finger swipe down to hide it?
Changing the edge the index bar is attached to is something we considered, but which didn't make the cut for release 3.0. It is definitely in the list though.
Changing the gesture is something we need to consider more carefully, both from a user-experience perspective and from a technical standpoint.
I might add over Simbul's answer that from an interaction perspective the double-tap is already a standard, and we're not going to implement it unless there's a big change in the current interaction model: from Kindle to iBooks to every magazine the overlay is shown at double tap, and we are going to be consistent with that. :)
I've just asked to make it optional, that designer or publisher will have a choice of behavioral model with their issue. And not to brake already a standard. Or we are going to be one of the same. Thank you for your answer.
Sure: you can develop an alternative if you need it, there's absolutely no problem in doing that and if other people will find it useful it could be a good addition. :)
Great! (:
Well, actually, an ability to choose where toc should appear is nice.
Yes. :) As Simbul was saying above that feature is already planned, it's tracked in Issue #106. :)
Could someone kindly tell me how to hack the framework to have the menu appear on the top edge instead of the bottom one or at least where the edge is defined in the code?
see replacements for the commented lines. these two changes will make it come in from the top
(void)setIndexViewHidden:(BOOL)hidden withAnimation:(BOOL)animation {
CGRect frame;
if (hidden) {
//frame = CGRectMake(0, pageHeight + pageY, pageWidth, indexHeight);
frame = CGRectMake(0, 0, pageWidth, 0-indexHeight );
} else {
//frame = CGRectMake(0, pageHeight + pageY - indexHeight, pageWidth, indexHeight);
frame = CGRectMake(0, 20, pageWidth, indexHeight);
}
if (animation) {
[UIView beginAnimations:@"slideIndexView" context:nil]; {
[UIView setAnimationDuration:0.3];
self.view.frame = frame;
}
[UIView commitAnimations];
} else {
self.view.frame = frame;
}
}
and this will make it come from left (> replaced with <):
- (BOOL)stickToLeft { return (actualIndexHeight < actualIndexWidth); }