Giter Club home page Giter Club logo

ftindicator's Introduction

FTIndicator

FTIndicator

Twitter GitHub license Version Platform Download CocoaPods CocoaPods CI Status GitHub stars

A light wight UI package contains local notification, progress HUD, toast, with blur effect, elegant API and themes Support for iOS. Inspired by Apple's process HUD, notifications and Android's toast.

3 IN 1

  • If you want use all three of the indicators, use FTIndicator .
  • Also, FTNotificationIndicator, FTProgressIndicator and FTToastIndicator are able to work separately. Use them all your will.

FTIndicator

FTNotificationIndicator FTProgressIndicator FTToastIndicator


ScreenShots

Portrait

Style Light Dark
Notification
Progress
Toast

Landscape

Style Light Dark
Notification
Progress
Toast

Installation

Manually

  • clone this repo.
  • Simply drop the '/FTIndicator' folder into your project.
  • import 'FTIndicator.h'

CocoaPods

FTIndicator is available through CocoaPods. To install it, simply add the following line to your Podfile:

⚠️ Notice:

Syntax error fix in 1.2.2: Syntax error fixed. May cause error to your projects, update it carefully.

⚠️ Notice:

major fix in 1.2.0: progress HUD doesn't show when app starts

FTNotificationIndicator, FTProgressIndicator and FTToastIndicator podfile stopped updating after v1.1.5. If you wanna use them separately, you should use them like this in your Podfile as a subPod:

    pod 'FTIndicator/FTNotificationIndicator'
    pod 'FTIndicator/FTProgressIndicator'
    pod 'FTIndicator/FTToastIndicator'

Use FTIndicator, all three of them

  • FTIndicator, 3 in 1
pod 'FTIndicator'

Use separately

  • FTNotificationIndicator

pod 'FTNotificationIndicator is not available anymore, use this:

# use as a subPod

pod 'FTIndicator/FTNotificationIndicator'
  • FTProgressIndicator

pod "FTProgressIndicator" is not available anymore, use this:

# use as a subPod

pod 'FTIndicator/FTProgressIndicator'
  • FTToastIndicator

pod 'FTToastIndicator' is not available anymore, use this:

# use as a subPod

pod 'FTIndicator/FTToastIndicator'

Usage

Use FTIndicator

Notification

  • show without image
[FTIndicator showNotificationWithTitle:@"Here is a notification title."
								message:@"Here is a notification message."]; 
  • show with image
[FTIndicator showNotificationWithImage:[UIImage imageNamed:@"maps_icon"]
								   title:@"Here is a notification title."
                               message:@"Here is a notification message."]; 
  • show with image, with tap handler and completion handler
[FTIndicator showNotificationWithImage:[UIImage imageNamed:@"maps_icon"]
                                 title:@"Here is a notification title."
                               message:@"Here is a notification message. Try to tap and see tap handling or do nothing to see completion"
                            tapHandler:^{
							// handle user tap
                            } completion:^{
							// handle completion
                            }];
  • dismiss manually
[FTIndicator dismissNotification];

Progress

  • show progress
[FTIndicator showProgressWithMessage:@"Here is a progress message."];  
// or disable user interactions

[FTIndicator showProgressWithMessage:@"Here is a progress message." userInteractionEnable:NO]; 
  • show success
[FTIndicator showSuccessWithMessage:@"Here is a success message."]; 
// or disable user interactions

[FTIndicator showSuccessWithMessage:@"Here is a success message." userInteractionEnable:NO]; 
  • show info
[FTIndicator showInfoWithMessage:@"Here is a info message."]; 
// or disable user interactions

[FTIndicator showInfoWithMessage:@"Here is a info message." userInteractionEnable:NO]; 
  • show error
[FTIndicator showErrorWithMessage:@"Here is a error message."];
// or disable user interactions

[FTIndicator showErrorWithMessage:@"Here is a error message." userInteractionEnable:NO];
  • dismiss manually
[FTIndicator dismissProgress];

Toast

  • show with image
[FTIndicator showToastMessage:@"Short Toast."];  
  • dismiss manually
[FTIndicator dismissToast];

Use FTNotificationIndicator, FTProgressIndicator, FTToastIndicator separately

FTNotificationIndicator

  • show with image
[FTNotificationIndicator showNotificationWithImage:[UIImage imageNamed:@"maps_icon"]
                                             title:@"Here is a notification title."
                                           message:@"Here is a notification message."]; 
  • show without image
[FTNotificationIndicator showNotificationWithTitle:@"Here is a notification title."
										     message:@"Here is a notification message."]; 
  • dismiss manually
[FTNotificationIndicator dismiss];

FTProgressIndicator

  • show progress
[FTProgressIndicator showProgressWithmessage:@"Here is a progress message."]; 
// or disable user interactions
[FTProgressIndicator showProgressWithmessage:@"Here is a progress message." userInteractionEnable:NO]; 
  • show success
[FTProgressIndicator showSuccessWithMessage:@"Here is a success message."]; 
// or disable user interactions
[FTProgressIndicator showSuccessWithMessage:@"Here is a success message." userInteractionEnable:NO]; 
  • show info
[FTProgressIndicator showInfoWithMessage:@"Here is a info message."]; 
// or disable user interactions
[FTProgressIndicator showInfoWithMessage:@"Here is a info message." userInteractionEnable:NO]; 
  • show error
[FTProgressIndicator showErrorWithMessage:@"Here is a error message."];
// or disable user interactions
[FTProgressIndicator showErrorWithMessage:@"Here is a error message." userInteractionEnable:NO];
  • dismiss manually
[FTProgressIndicator dismiss];

FTToastIndicator

  • show with image
[FTToastIndicator showToastMessage:@"Short Toast."];  
  • dismiss manually
[FTToastIndicator dismiss];

CHANGELOG

CHANGELOG

License

FTIndicator is available under the MIT license. See the LICENSE file for more info.

ftindicator's People

Contributors

157121900 avatar bqlin avatar kekedandois avatar liufengting avatar realbonus avatar yulichandra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ftindicator's Issues

no dissmiss

从一个控制器pop回来的时候 在viewWillAppear里面执行方法里面用到 [FTIndicator showProgressWithMessage:@"加载中..."]; 然后在 [FTIndicator dismissProgress];视图并不会隐藏

progress位置不对

点击按钮显示loading框,第二次显示的时候,loading框位置没有在屏幕中心

Not able to disable the view interactions

Hi,

I am using the FTProgressIndicator from cocoapods version 1.1. I want to disable the view interaction in some of the screen while progress indicator is going on. But I can see that there are currently no API available to disable the view interaction.

Are there any plan to include such APIs? Let me know if any alternatives are available apart from handling within app?

Thanks & Regards,

cocoapods error

When I imported the project through cocoapods,'cannot synthesize weak property because the current development target does not support weak references' occurred
snip20170710_1

Indicator not dismissing

Issue happens when:

  1. Load a viewcontroller, query something in the background (e.g. Parse query.findObjectsInBackground)
  2. In query.findObjectsInBackground callback (dismiss Progress)
  3. Indicator still there

Note: Only occurs on first time FTIndicator is loaded. Hacked around issue by callign showprogress and then dismissprogress in AppDelegate before any views can be loaded

Happens when loading a new view controller. I believe the indicator hasn't had time to load before calling my dismiss, which causes the issue. Showing and dismissing progress occurs on main thread

FTIndicator showToastMessage doesn't wrap

I'm trying to wrap my toast message or make it appear on one line.
However I get three dots and no break.

The demo seems fine, although I didn't have to use the pod library with it.

Please advise.

Spinner disappearance stutters

Situation:
When user provide login, password and click "log in" then I show
[FTProgressIndicator showProgressWithmessage:nil userInteractionEnable:NO];
and after successful, app change controller :
- (void)loginSuccessful {
[FTProgressIndicator dismiss];
[[AMMainViewController sharedViewController]changeToControllerType:AMViewControllerTypeHome];
}

where changeToController looks like:
`- (void)changeToControllerType:(AMViewControllerType)type userInfo:(NSDictionary *)userInfo {
UIViewController *newVC = [AMViewControllerFactory viewControllerWithType:type];

if ([newVC isKindOfClass:[UINavigationController class]]) {
    UIViewController *embededViewController = ((UINavigationController *)newVC).viewControllers.firstObject;
    if ([embededViewController respondsToSelector:@selector(setUserInfo:)]) {
        [embededViewController performSelector:@selector(setUserInfo:) withObject:userInfo];
    }
} else if ([newVC respondsToSelector:@selector(setUserInfo:)]) {
    [newVC performSelector:@selector(setUserInfo:) withObject:userInfo];
}

[self.currentVC willMoveToParentViewController:nil];
[self addChildViewController:newVC];

[self.view addSubview:newVC.view];
[newVC.view mas_makeConstraints:^(MASConstraintMaker *make) {
    make.edges.equalTo(self.view);
}];

[newVC.view layoutIfNeeded];

newVC.view.alpha = 0.0f;
[self setNeedsStatusBarAppearanceUpdate];
[UIView animateWithDuration:0.25f
                      delay:0
                    options:UIViewAnimationOptionCurveEaseInOut
                 animations:^{
                     newVC.view.alpha = 1.0f;
                 } completion:^(BOOL finished){
                     [self.currentVC.view removeFromSuperview];
                     [self.currentVC removeFromParentViewController];
                     [newVC didMoveToParentViewController:self];
                     self.currentVC = newVC;
                 }];

} `

And indicator stutter. You can check it out or tell me how to get around this?

Dismiss notification after specific delay or never

Hi there,

I would like to have the ability to set the time before any notification disappears. Right now it disappears always after a specific time has passed.

Moreover I would like to make it never disappear (until user taps it).

Except than that the library is very cool and easy to integrate! Thx

'NSInvalidArgumentException', reason: '+[FTIndicator showProgressWithmessage:userInteractionEnable:]: after Cocoapod update

Great library and very clean and easy to use, thanks very much!

One problem however... After updating via Cocoapods today I get the following error when trying to use the userInteractionEnable functionality:

'NSInvalidArgumentException', reason: '+[FTIndicator showProgressWithmessage:userInteractionEnable:]:

It's weird, as I can actually see the code in the FTIndicator source...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.