All Projects → nitishmakhija → Easytipview

nitishmakhija / Easytipview

Licence: mit
Objective-C alternative for EasyTipView implemented in swift

Projects that are alternatives of or similar to Easytipview

Gskstretchyheaderview
A generic stretchy header for UITableView and UICollectionView
Stars: ✭ 1,624 (+745.83%)
Mutual labels:  uiview
Banner
🔥🔥🔥Banner 2.0 来了!Android广告图片轮播控件,内部基于ViewPager2实现,Indicator和UI都可以自定义。
Stars: ✭ 11,682 (+5984.38%)
Mutual labels:  banner
Svg Banners
Styled banners for your Readme made with html/css in SVG !!
Stars: ✭ 145 (-24.48%)
Mutual labels:  banner
Dry View
Complete, standalone view rendering system that gives you everything you need to write well-factored view code.
Stars: ✭ 124 (-35.42%)
Mutual labels:  uiview
Anwexpandscrollview
Expand - Collapse Scroll View - Animate With Pinch Gesture
Stars: ✭ 125 (-34.9%)
Mutual labels:  uiview
Closures
Swifty closures for UIKit and Foundation
Stars: ✭ 1,720 (+795.83%)
Mutual labels:  uiview
Materialcomponent.banner
Material component for Android: Banner
Stars: ✭ 115 (-40.1%)
Mutual labels:  banner
Bannerviewpager
🚀 An awesome banner view for Android,Based on ViewPager2. 这可能是全网最好用的ViewPager轮播图。简单、高效,一行代码实现循环轮播,一屏三页任意变,指示器样式任你挑。
Stars: ✭ 2,603 (+1255.73%)
Mutual labels:  banner
Nativescript Feedback
📢 Non-blocking textual feedback for your NativeScript app
Stars: ✭ 127 (-33.85%)
Mutual labels:  banner
Inappviewdebugger
A UIView debugger (like Reveal or Xcode) that can be embedded in an app for on-device view debugging
Stars: ✭ 1,805 (+840.1%)
Mutual labels:  uiview
Lsanimator
⛓ Easy to Read and Write Multi-chain Animations Lib in Objective-C and Swift.
Stars: ✭ 1,576 (+720.83%)
Mutual labels:  uiview
Xbanner
🔥【图片轮播】支持图片无限轮播,支持AndroidX、自定义指示点、显示提示文字、切换动画、自定义布局,一屏显示多个等功能
Stars: ✭ 1,734 (+803.13%)
Mutual labels:  banner
Instagramactivityindicator
Activity Indicator similar to Instagram's.
Stars: ✭ 138 (-28.12%)
Mutual labels:  uiview
Zbanner
一个自定义的轮播控件
Stars: ✭ 124 (-35.42%)
Mutual labels:  banner
Termux Banner
Termux Banner Maker Script by Parixit Sutariya (BullAnonymous)
Stars: ✭ 151 (-21.35%)
Mutual labels:  banner
Swifty360player
iOS 360-degree video player streaming from an AVPlayer.
Stars: ✭ 118 (-38.54%)
Mutual labels:  uiview
Flareview
Create Animatic flares around your uiview's. Visit http://stanlyhardy.github.io/FlareView for more info
Stars: ✭ 136 (-29.17%)
Mutual labels:  uiview
Render
UIKit a-là SwiftUI.framework [min deployment target iOS10]
Stars: ✭ 2,150 (+1019.79%)
Mutual labels:  uiview
Lcbannerview
A very popular and highly customized banner view! Infinite loop support!
Stars: ✭ 158 (-17.71%)
Mutual labels:  banner
Uicard
Generic UI for card games like Hearthstone, Magic Arena and Slay the Spire...
Stars: ✭ 142 (-26.04%)
Mutual labels:  uiview
EasyTipView: fully customisable tooltip view written in Swift

Description

EasyTipView is a fully customisable support for EasyTipView written in Swift. (https://github.com/teodorpatras/EasyTipView)

Contents

  1. Features
  2. Installation
  3. Usage
  4. Customising the appearance
  5. Customising the presentation and dismissal animations
  6. Public interface

## Features

  • Can be shown pointing to any UIBarItem or UIView subclass.
  • support for any arrow direction ←, →, ↑, ↓
  • Automatic orientation change adjustments.
  • Fully customisable appearance.
  • Fully customisable presentation and dismissal animations.

Installation

Manually

Drag drop Source folder in your project

Pods

To integrate EasyTipView into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'NMEasyTipView', '~> 1.2'

Then, run the following command:

$ pod install

Usage

  1. First you should customize the preferences:
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(50, 100, 100, 50);
    [button setTitle:@"Click Me" forState:UIControlStateNormal];
    [button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
    [self.view addSubview:button];
    
    
    [button addTarget:self action:@selector(handle:) forControlEvents:UIControlEventTouchUpInside];
    
    RCEasyTipPreferences *preferences = [[RCEasyTipPreferences alloc] initWithDefaultPreferences];
    preferences.drawing.backgroundColor = [UIColor purpleColor];
    preferences.drawing.arrowPostion = Top;
    preferences.animating.showDuration = 1.5;
    preferences.animating.dismissDuration = 1.5;
    preferences.animating.dismissTransform = CGAffineTransformMakeTranslation(0, -15);
    preferences.animating.showInitialTransform = CGAffineTransformMakeTranslation(0, -15);
    
    RCEasyTipView *tipView = [[RCEasyTipView alloc] initWithPreferences:preferences];
    tipView.text = @"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.";
    [tipView showAnimated:YES forView:button withinSuperView:self.view];

Customising the appearance In order to customise the EasyTipView appearance and behaviour, you can play with the Preferences structure which encapsulates all the customizable properties of the EasyTipView. These preferences have been split into three structures:

  • Drawing - encapsulates customisable properties specifying how EastTipView will be drawn on screen.
  • Positioning - encapsulates customisable properties specifying where EasyTipView will be drawn within its own bounds.
  • Animating - encapsulates customisable properties specifying how EasyTipView will animate on and off screen.

| Drawing attribute | Description | |----------|-------------|------| |cornerRadius| The corner radius of the tip view bubble.| |arrowHeight| The height of the arrow positioned at the top or bottom of the bubble.| |arrowWidth| The width of the above mentioned arrow.| |foregroundColor| The text color.| |backgroundColor| The background color of the bubble.| |arrowPosition| The position of the arrow. This can be:
+ Top: on top of the bubble
+ Bottom: at the bottom of the bubble.
+ Left: on the left of the bubble
+ Right: on the right of the bubble
+ Any: use this option to let the EasyTipView automatically find the best arrow position.
If the passed in arrow cannot be applied due to layout restrictions, a different arrow position will be automatically assigned.| |textAlignment| The alignment of the text.| |borderWidth| Width of the optional border to be applied on the bubble.| |borderColor| Color of the optional border to be applied on the bubble. In order for the border to be applied, borderColor needs to be different that [UIColor clear] and borderWidth > 0| |font| Font to be applied on the text. |

| Positioning attribute | Description | |----------|-------------|------| |bubbleHInset| Horizontal bubble inset witin its container.| |bubbleVInset| Vertical bubble inset within its container.| |textHInset| Text horizontal inset within the bubble.| |textVInset| Text vertical inset within the bubble.| |maxWidth| Max bubble width.|

| Animating attribute | Description | |----------|-------------|------| |dismissTransform| CGAffineTransform specifying how the bubble will be dismissed. | |showInitialTransform| CGAffineTransform specifying the initial transform to be applied on the bubble before it is animated on screen. | |showFinalTransform| CGAffineTransform specifying how the bubble will be animated on screen. | |springDamping| Spring animation damping.| |springVelocity| Spring animation velocity.| |showInitialAlpha|Initial alpha to be applied on the tip view before it is animated on screen.| |dismissFinalAlpha|The alpha to be applied on the tip view when it is animating off screen.| |showDuration|Show animation duration.| |dismissDuration|Dismiss animation duration.|

Customising the presentation or dismissal animations

The default animations for showing or dismissing are scale up and down. If you want to change the default behaviour, you need to change the attributes of the animating property within the preferences. An example could be:

preferences.drawing.arrowPostion = Top;
preferences.animating.showDuration = 1.5;
preferences.animating.dismissDuration = 1.5;
preferences.animating.dismissTransform = CGAffineTransformMakeTranslation(0, -15);
preferences.animating.showInitialTransform = CGAffineTransformMakeTranslation(0, -15);

This produces the following animations:

Public interface

#Delegate EasyTipViewDelegate is a custom protocol which defines one method to be called on the delegate after the EasyTipView has been dismissed.

@protocol RCEasyTipViewDelegate <NSObject>
@optional

- (void)willShowTip:(RCEasyTipView *)tipView;
- (void)didShowTip:(RCEasyTipView *)tipView;

- (void)willDismissTip:(RCEasyTipView *)tipView;
- (void)didDismissTip:(RCEasyTipView *)tipView;

@end

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].