Skip to content

Mervin1024/MERNoticeBar

Repository files navigation

MERNoticeBar

A NoticeBar similar with QQ Navigationbar notice view,written by Objective-C.

一个风格类似于 QQ 的顶部导航栏信息提醒 view,使用 Objective-C 语言。

中文说明

ScreenShots

tips : Please set the "View controller-based status bar appearance" to "NO" in the "info.plist",otherwise the status bar style can not be changed.

Another 'NoticeBar' project by swift

Thanks so much for @qiuncheng's thinking. At first I find the NoticeBar project by @qiuncheng , but it just support swift.So I wrote this Objective-C version according to NoticeBar.After that I added some of my own ideas in this project.

If you want a swift version , you can try the NoticeBar

Support

Objective-C & iOS 8+

Installation

CocoaPods

  1. add pod 'MERNoticeBar' to your Podfile.
  2. Run pod install OR pod update.
  3. import MERNoticebar

Manually

  1. Download the full file.
  2. Drag the MERNoticeBar folder to your project.

Example

Default type

How to use? For example: -> MERNoticeBarDefaultTypeSuccess:

// title : The message you want to show
// defaultType : Above four types with different style above.
[MERNoticeBar showAnimationWithTitle:"#message" defaultType: MERNoticeBarDefaultTypeSuccess completed:^(BOOL finished) {
                // completed
 }];

Custom

Also you can custom MERNoticeBarConfig


MERNoticeBarConfig *config = [[MERNoticeBarConfig alloc] initWithTitle:(NSString *)
                                                                     image:(UIImage *)
                                                                 textColor:(UIColor *)
                                                           backgroundColor:(UIColor *)
                                                                  barStyle:(MERNoticeBarStyle)
                                                             animationType:(MERNoticeBarAnimationType)];
[MERNoticeBar showAnimationWithConfig:config completed:nil];

ToDo

  • Custom Background image
  • Custom content view

Contact

If you have a new idea about this project, Please let me know. OR pull request.

License

MERNoticeBar is provided under the MIT license. See LICENSE file for details.

About

仿QQ导航栏位置的信息提示框

Resources

License

Stars

Watchers

Forks

Packages

No packages published