From 642bd1ed307af8784d74540db01f9c53bdef0b63 Mon Sep 17 00:00:00 2001 From: Andrea Mazzini Date: Thu, 4 Sep 2014 19:22:59 +0200 Subject: [PATCH] Updated README and bumped version number --- AMPopTip.podspec | 4 ++-- README.md | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/AMPopTip.podspec b/AMPopTip.podspec index 6b601540..cfa68101 100644 --- a/AMPopTip.podspec +++ b/AMPopTip.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "AMPopTip" - s.version = "0.3.1" + s.version = "0.4" s.summary = "Animated popover, great for subtle UI tips and onboarding." s.description = <<-DESC @@ -13,7 +13,7 @@ Pod::Spec.new do |s| s.homepage = "https://github.com/andreamazz/AMPopTip" s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = { "Andrea Mazzini" => "andrea.mazzini@gmail.com" } - s.source = { :git => "https://github.com/andreamazz/AMPopTip.git", :tag => '0.3.1' } + s.source = { :git => "https://github.com/andreamazz/AMPopTip.git", :tag => '0.4' } s.platform = :ios, '7.0' s.source_files = 'AMPopTip', '*.{h,m}' s.requires_arc = true diff --git a/README.md b/README.md index 940892c0..441b6be5 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,29 @@ This popover can be used to leave subtle hints about your UI and provide fun loo * Run ```open App.xcworkspace``` #Usage +The API is fairly straight forward, you can show and hide the popover at any time. + +##Showing the popover You must specify the text that you want to display alongside the popover direction, its max width, the view that will contain it and the frame of the view that the popover's arrow will point to. ```objc self.popTip = [AMPopTip popTip]; [self.popTip showText:@"I'm a popover popping over" direction:AMPopTipDirectionUp maxWidth:200 inView:self.view fromFrame:someView.frame]; ``` +##Dismissing the popover +You can hide the popover by calling: +```objc +[self.popTip hide]; +``` +Or you can specify the duration of the popover: +```objc +[self.popTip showText:@"I'm a popover popping over" direction:AMPopTipDirectionUp maxWidth:200 inView:self.view fromFrame:someView.frame duration:3]; +``` +You can also let the user dismiss the popover by tapping on it: +```objc +self.popTip.shouldDismissOnTap = YES; +``` + #Customization Use the appearance proxy to customize the popover before creating the instance, or just use its public properties: ```objc