i am using Nimbus kit for my app. I have different Page Scroll Views. Each Page have a button. when i click on the button i need to go to next page. for that i am using
[self.pagingScrollView moveToNextAnimated:YES]; . It works fine. But i need to disable to horizontal scrolling of a page. NIPagingScrollView is a subclass of UIView, so i can't use a scrollEnabled property. How can i dsiable scrolling on NIPagingScrollView. I don't want a user to swipe next/previous of the screen.
Thanks,
You can access the paging scroll view via the pagingScrollView property on NIPagingScrollView.
Related
I have a UIScrollView which has a bunch of UIButtons as children.
If I click outside of these buttons, I am able to scroll the UIScrollView. However, if I try to scroll by clicking on one of these buttons, the scrollview doesn't work.
Each button is registered to listen to UIControlEventTouchUpInside.
Any ideas?
If you're touching the button and hoping to scroll, then you should be linking to the UIControlEventTouchDownInside event, not outside!
Additionally, you have to pass the touch event to the underlying UIScrollView to make the scrolling happen. The app is actually trying to do you a favor by letting you click the button and not scrolling the table.
Good luck
I have UIScrollView and i'm using it in pagingEnabled mode. In this UIScrollView,i've many images to load.So it's impossible to load all of them. I decided to load five by five. Initially, i load five images and set their position,size and tags. So far, i'm able to do this.
Once user arrives fourth page, i need to set sixth page and remove first page from superview. For that, I'm using this method to do that.
[[self.scrollView viewWithTag:currentPage-3] removeFromSuperView];
To detect page changed event properly, i've used almost all of the delegate methods of UIScrollView, but when users scrolls continuously, i've missed pages. So, i cannot load images properly. For example,when i missed to load page 6, i cannot load page 8.
I tried to disable userInteraction mode, even if it's set to NO,user can continue scrolling.
What i want to do is,when user did page changed, i want to disable UIScrollView to scroll until i finished loading images into UIScrollView.
Do you guys have any idea,how can i accomplish that ?
Thank you.
What i want to do is,when user did page changed, i want to disable UIScrollView to scroll until i finished loading images into UIScrollView.
If you want to disable scrolling after each page scroll, look to the UIScrollViewDelegate methods, like scrollViewDidScroll:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIScrollViewDelegate_Protocol/Reference/UIScrollViewDelegate.html#//apple_ref/occ/intf/UIScrollViewDelegate
Within scrollViewDidScroll: you can set scrollEnabled on the UIScrollView to NO. Once you're images finish loading, re-enable scrolling through the same property.
I have a "side panel" like widget in my app that can be swiped in from the side of the screen. In order to help the users find the panel, I also added a UIButton to do the same thing - scroll the panel on and off screen.
The view comes from a different view controller, otherwise I would've simply created an extra panel in the interface builder and positioned it properly.
My problem is that the side panel gets positioned over the button, so if it is displayed with a button, it can only be dismissed with a gesture.
is it possible to specify at which "depth" I add a UIView when I programmatically add it in code?
This is the snipped that slides the panel in or out within the animation block.
self.audioSystemController.view.frame =CGRectMake(0,20, 120,460);
I need the UIView to be shown below a UIButton, so the button may be used to dismiss the view. I know this is redundant, but I cannot depend on the users to simply discover the side swiping gestures :/
Thank you for your help!
Check out the insertSubview:belowSubview: method of UIView.
I have a scroll view which has paging enabled.Its horizontal scrolling so when user scrolled from first page it would land the user in second page and second page has one slider.when the user slides(not touches) on this slider it automatically scrolls to first page because its horizontal scrolling too.Unless its touch on slider user end up in going to first page though user not intended to go to first page.
I had the same kind of problem once but with another control.
Take a look ate this answer to see if it canhelp you :
iPhone - UIScrollView and UIDatePicker scrolling conflict : the one interfer with the second
Does the second view on the scrollView contains any other container like WebView or imageView etc.
If you are showing your data directly on the ScrollView (i.e on second page).I recommend that to add a one more view on your scrollView on second view and render your data on that view the you wil be able to use the main ScrollView and the second view scroll separately.
You could try adding actions for UIControlEventTouchDown, UIControlEventTouchUpInside and UIControlEventTouchUpOutside to your slider. On touch down, do myScrollView.scrollEnabled = NO; and restore scrolling on touch up.
I have a table view inside a navigation controller, which is one view for a tab bar.
Everytime I launch the app, the horizontal scroll indicator flashes briefly when i select this tab.
Could this be related to the initial tab selected, which does contain a scrollview?
I was under the impression that table views couldn't scroll horizontally?
It doesnt seem to affect the app, just annoying thats all.
Do you do programmatic scrolling in your view?
We did this flashing on purpose in one of our apps, using some code to set a new scroll position (0) with animation enabled.
EDIT: There is also the method: flashScrollIndicators in UIScrollView (a UITableView also being a UIScrollView).