I have a searchbar present in a uisearchview. When I click on the search and then cancel it, the searchbar suddenly vanishes from the scrollview.
What am I missing?
check the UISearchBar frame before search and after it. I think you have some problems with layout...
Related
I have an NSCollectionView inside a Tab which contains subviews with NSTextField that have expanding tooltips.
Strangely, after a new search (ReloadData) or going to a tab and coming back, the tooltips no longer expand. They come back only if I resize the window or scroll the CollectionView*. Clicking in the view does not help. What can I do to automatically have the tooltips work?
*This triggers the CollectionView and the CollectionViewItems to UpdateTrackingAreas. I tried to force this on ReloadData even delayed 1000 ms, but this did not make the tooltips able to expand.
Thoughts:
Something related to UpdateTrackingAreas but not exactly?
Maybe a first responder issue?
It also doesn't work if the window is not the active window (which is ok)
Concerned that it might be related to How do I update the expansion tooltip size after calling NSTextField setStringValue:?
I have a View, inside this view I have on the right side some buttons and a ScrollView.
When you press one of the buttons, the scrollview comes up and more buttons are shown.
Now when you press one of the buttons of the scrollview in the main view is placed a image and the scrollview animated thru the right side.
When I push the next button, the scrollview is under the image and not over the image :(
I'ved tried to place some code at the scrollview to bring it in front
[waende bringSubviewToFront:waende];
or
[waende bringSubviewToFront:button];
but still doesn't work
In the IB the ScrollView is in Foreground.
The solution code is:
[self.view bringSubviewToFront:waende];
I need to display/show a Picker when a user taps on a textfield, I mean, it should appear a picker instead of a keyboard. Also, some sort of "done" button above the picker so the user clicks on it and the value from the picker is copied to the textfield and the picker is hidden again.
I've checked many tutorials from the web but haven't found anyone that can really help me.
I found a tutorial that pointed me in the right direction but I'm still missing to disappear the keyboard when clicking on the textfield.
Dismissing UIPickerView with Done button on UIToolBar by #slev
Any ideas?
If you're not targeting iOS versions older than 3.2, it's easy. You can either assign the UIPickerView as the inputView property of the UITextField and the UIToolbar containing the 'done' button as the inputAccessoryView, or you could make a single UIView that has both the picker and the toolbar as subviews and assign that as the intputView (and leave inputAccessoryView as nil). Either way, this will animate your picker in in place of the normal keyboard when the text field is activated.
More details on this are available in the documentation.
I've been searching for some time for an answer on this problem:
How can I keep the scrollbars on my UIScrollView and UIWebview visible? So that the user knows he can scroll up or down. (like in firefox or any other browser so without touching the scrollvie first)
I read on some sites that it wasn't possible, so my other question would be:
Is there a way to add a "scrollbar" to a scrollview or webview?
Thank you very much
Maybe you could use this:
flashScrollIndicators
It won't show the scrollbar all the time, but it just flashes when the view is loaded.
Edited: Other solution:
In your view didload, you make a scrollview of you webview like this:
UIScrollview *scrollview = [webview.subviews objectAtindex:0];
you have to set the delegate of the scrollview on self:
scrollview.delegate= self
in your .h file you add
When you place in your .m file you can use:
-(void)ScrollviewDidscroll:...
(I don't know if it works when you have multiple scrollviews)
Yes you can try adding a custom view ( can be image view) on top the scrollbar. You will have to monitor the contentOffset and contentSize to know where you are. Based on this information, you can position your custom scroll bars.
I am working on an app (its actually a game) that needs to detect Swipe Gestures. When I do swipe on my image view, the image for the image view needs to be changed, but unfortunately it is not working as expected.
When I add the swipe gesture object to self.view, the desired action is performed whenever I swipe my finger to any location in the view, but I want this action to be performed only when I swipe my finger over the imageView.
On the other hand, when I try to add the swipe gesture to the image view, it doesn't respond to the gesture event.
Please reply if you have the solution to this problem!
Thanks in advance!
It sounds like your UIImageView has userInteractionEnabled set to NO. Try setting yourImageView.userInteractionEnabled = YES and adding your swipe gesture recognizer to the UIImageView.
I too faced the same issue..
The option 'User Interaction Enabled' under Attributes Inspector(available in Inspector window of Interface Builder) was unchecked,
Enabling it solved my problem.
done using storyboard...
Thanks