Comments (14)
Hard to tell without some code.
from ampoptip.
I forgot to add the correct markdown. I updated my post above.
I am simply using:
tooltip = [AMPopTip popTip];
tooltip.shouldDismissOnTap = YES;
[tooltip showText:@"Tap to become invisible." direction:AMPopTipDirectionUp maxWidth:200 inView:self.topScrollView fromFrame:self.topScrollView.frame];
I am also using auto layout.
from ampoptip.
It might be the fromFrame
Try to use a smaller frame within the scroll view.
from ampoptip.
Thanks! It was located on top of the refreshcontrol. I had to pull down the scroll view to see it.
I now tried to use self.navigationItem.titleView.frame
as the fromFrame but it seems to get located about 60px below the navigation bar. Any ideas?
from ampoptip.
It really depends on where you want to show it. You can build your own frame anyway, so if you want to pin the poptip wherever you like, you can just build a 1x1 rect in the origin you best see fit.
from ampoptip.
It seemed to work if I placed it in self.navigationController.navigationBar
.
Thanks for helping out!
from ampoptip.
π
from ampoptip.
Just noticed that the tap gesture doesn't work then as the pop tip is outside the navigation bar view.
from ampoptip.
Can you post a screenshot pointing where you want to put the poptip?
from ampoptip.
If I set [[AMPopTip appearance] setOffset:30.];
when placing it in self.view it works, but shouldn't it calculate the correct position without an offset?
from ampoptip.
This should work:
[self.popTip showText:@"Hello!"
direction:AMPopTipDirectionDown
maxWidth:200
inView:self.navigationController.view
fromFrame:CGRectMake(self.navigationController.navigationBar.frame.size.width / 2, self.navigationController.navigationBar.frame.size.height + [UIApplication sharedApplication].statusBarFrame.size.height , 1, 1)];
from ampoptip.
Thanks! That did work, however the pop tip was placed about 30px below the desired location.
This did work perfectly
[tooltip showText:@"Hello!" direction:AMPopTipDirectionDown maxWidth:200 inView:self.navigationController.view fromFrame:self.navigationItem.titleView.frame];
and the gesture also works. Thanks once again!
from ampoptip.
Sorry, I forgot to remove my offset. Your code works perfectly!
from ampoptip.
Glad to hear that! Cheers π
from ampoptip.
Related Issues (20)
- shouldDismissOnSwipeOutside is not working
- 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
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.