I have added a pickerView inside a scrollview but when i change the value of picker view it gets scrolled and the value did not get changed.
Please tell me what I should do to prevent scrolling when it is on picker view.
Please help me
Thanks in advance!!
Apple's HIG refuse to put picker view inside a scrollable view. I recommend to put it in a popup view unless the scroll view in scrollable horizontally only.
Add pickerView outside scrollView
Related
I have a scroll view which contains different ui components such as text fields, labels etc.
The scroll view takes almost the full size of the screen. Logically separated, I want to add/display a button which is not a part of the content of the scroll view.
This leads to the problem that my button doesn't react on my touches. In case, I reduce the size of the scroll view so that the frames don't interfere with the ones from the button, everything works as expected.
I tried to bring the button to the front (view.bringSubviewToFront(infoButton)) but it still doesn't work.
I think you want to implement something like 'Gmail app, a plus button is floating at the bottom right of the screen.
add your scroll view to view and add other elements to scroll view:
view.addSubview(yourScrollView)
yourScrollView.addSubview(yourButton)
yourScrollView.addSubview(yourLabel)
after you finished adding scrollView's sub views it's time to add your button to -> View (not scroll view)
and everything should work fine as you expected
Issue is solved!
It is a matter of how you ad your sub views to the main view. In my case, I added the info button first to the main view followed by adding the scroll view to the main view.
You need to change the order. First you add the scroll view to the main view and then the button.
I have 4 UIViews stacked in a UIScrollView.
When any one of the UIViews are tapped, I want that particular view to expand and show some more content and this would mean the sibling views below the selected view has to push themselves down.
I could have used UITableView but there are all kinds of weird stuff happening when you change the row heights dynamically which is why I chose this fallback.
Can I use autoresizingmask to do this ?
Cheers
Your question Answer is not so simple,you Need to use Different Logic Means You know how Much Width and Hight your Each view have after Clicking on it and then you can pass the reference of View to setContentSize of Scrollview.here is some tutorial which solved my problem when i was putting some run time data in Scrollview.
link
link
Hope it will be helpfull for you.
I am working on a navigation based app. every cell has a detail view. i have textView in detail view which shows details of selected cell. is it possible to add a facebook like icon in the end of textView? and if no then how should i do that. thanx in advance.
You can put the icon after the textview, or you can overlay it on top of the textview. It's as simple as putting it there in interface builder:
or, just set the frame properties of the text view and the image view to overlap, and place the image view on top of the text view (simplest way is just to "addSubview" it 2nd, which will place it on top).
I'm trying to add a button on the bottom of a TableView, without any success.
The idea isn't to use the tableFooterView property, as that doesn't show the button in a fixed position.
My idea is more along the lines of the Facebook application's Notifications bar on the bottom.
I'm using Three20.
Any pointers on how I can achieve this?
Thanks
Just add button to the view below your tableview but ensure your table height is less than the position you are adding the button,this way your can scroll table above button & your button will always be visible
Just embed custom view over your tableview.i mean on the bottom of tableview.so the tableview will scroll and the view don't.
Add a UIView as the footerView and then add the UIButton to the UIView.
I have a webview. I want to keep the webview in a scroll view such that it looks like entire view is scrolling. Any suggestions will be greatly welcomed...
You can simply disable the UserInteraction of WebView.Hope it works.
I have done this by extending the height of the web view, applying [clearColor] to the web view and adding drop shadows to it...