Comments (9)
The poptip behaves like a common UIView, so you just need to take the contentOffset
of your scrollview in consideration when presenting it (use the offset to offset the tip's frame). I'm using it in table views (which are scrollviews) without any issue.
from ampoptip.
AMPopTip.m
?
You're still using the Objective-C version? That code is really old, you should move to the latest release, which has the appropriateconstrainInContainerView
property to skip that check.
Ah, thanks mate! This all makes perfect sense now. :)
from ampoptip.
Hi @andreamazz , can you show the piece of code?
from ampoptip.
@andreamazz Please provide code. I have been struggling for over 2 hours with this issue. My poptip shows perfectly in the initial view of the scrollview. Anything outside of the initial view will have the poptip jump to the top part of the scrollview
from ampoptip.
Hi @MincDev, this isn't a issue at all, I was just mistaken back then, remember that the frame that points the popView and the View that is going to show it, doesn't have to be the same, use the scrollView you want to pop it.
from ampoptip.
@andreamazz Please provide code. I have been struggling for over 2 hours with this issue. My poptip shows perfectly in the initial view of the scrollview. Anything outside of the initial view will have the poptip jump to the top part of the scrollview
If I understand this correctly you want to show the tip on a scrollable view, and have the tip follow the scrolling instead of staying put, correct? Let me concoct a quick sample, BRB
from ampoptip.
Here. As you can see the tip is shown in the scrollview. Consider that show
just calls addSubview
to the view that you pass in the in
parameter, the from
frame is used just to adjust the position in relation to that view. Treat it as you would treat a common UIView
from ampoptip.
Here. As you can see the tip is shown in the scrollview. Consider that
show
just callsaddSubview
to the view that you pass in thein
parameter, thefrom
frame is used just to adjust the position in relation to that view. Treat it as you would treat a commonUIView
No, the problem was that if I wanted to show the tooltip and the screen has been scrolled down from the original loading state, the tooltip would display at the top, outside of the current view. As if the part of the scrollview currently being shown does not exist. However I was able to fix this issue by commenting out the following in your code. (I only commented this out, because I don't know if it may break something else, but seems to be working perfectly now) - My poptip scrolled perfectly with my scrollview but when trying to show the poptip on a view which is not in the initially loaded scrollview frame, caused the issue.
if (y + frame.size.height > self.containerView.bounds.size.height) { y = self.containerView.bounds.size.height - frame.size.height - self.edgeMargin; }
- Line 145 of AMpopTip.m
This part of the code didn't make sense to me as it kept on overriding my offsetBy method. Taking it out, allowed me to put the poptip anywhere I wished. However, if you know whether this may cause other issues, please let me know.
from ampoptip.
AMPopTip.m
?
You're still using the Objective-C version? That code is really old, you should move to the latest release, which has the appropriate constrainInContainerView
property to skip that check.
from ampoptip.
Related Issues (20)
- UICollectionViewCell POP HOT 1
- I can't set the borderWidth and the cornerRadius HOT 2
- Top border gets cut-out HOT 1
- Failed github "andreamazz/AMPopTip" ~> 4.5.3 Carthage update in Xcode 13 beta 5 HOT 2
- Anyone having issues building with Xcode Cloud? HOT 2
- Carthage Update for XCODE 13 RC failed. HOT 2
- XCode 13 release build and archive issue HOT 3
- Xcode 13 build error HOT 6
- Xcode 13 Swift 5.5 HOT 11
- Button events do not work
- Ambiguous use of 'cornerRadius' HOT 2
- Unable to pod install 4.6.1 HOT 1
- It's hard to center Horizontally the popover HOT 1
- Crashes while launching the app HOT 2
- If a PopTip is visible and we hide that Poptip and click show it again, the Poptip won't show. HOT 2
- I have a similar framework,(#^.^#)
- Support for building with visionOS SDK
- When the device rotates, the position becomes incorrect
- privacy manifest addition if required HOT 1
- Upload Privacy Policy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ampoptip.