GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - smallmuou/PPDragDropBadgeView: PPDragDropBadgeView is a badge view which able to drag and drop. Just like QQ 5.0 badge view.

BranchesTags
Open more actions menu

Latest commit

 

History

33 Commits
33 Commits

Folders and files

NameName
Last commit message
Last commit date
PPDragDropBadgeView.xcodeproj
PPDragDropBadgeView.xcodeproj
 
 
PPDragDropBadgeView
PPDragDropBadgeView
 
 
PPDragDropBadgeViewTests
PPDragDropBadgeViewTests
 
 
DemoTableViewController.h
DemoTableViewController.h
 
 
DemoTableViewController.m
DemoTableViewController.m
 
 
DemoTableViewController.xib
DemoTableViewController.xib
 
 
PPDragDropBadgeView.gif
PPDragDropBadgeView.gif
 
 
PPDragDropBadgeView.podspec
PPDragDropBadgeView.podspec
 
 
README.md
README.md
 
 

Repository files navigation

PPDragDropBadgeView

PPDragDropBadgeView is a badge view which able to drag and drop. Just like QQ 5.0 badge view. image

  • Support iOS 5.0+ ARC

Configure

  • Checkout PPDragDropBadgeView from github.
  • Copy PPDragDropBadgeView folder to your project.
  • Go to 'TARGET' -> 'Build Phases' -> 'Complile Sources', add compliler flags '-fno-objc-arc' for 'PRTween.m' and 'PRTweenTimingFunctions.m'
  • Done.

You can also refer to the example project provided by me.

Usage

  • Q: How to use PPDragDropBadgeView?

  • A: Very simple, you only follow the down code.

PPDragDropBadgeView* badgeView
= [[PPDragDropBadgeView alloc] initWithFrame:CGRectMake(0, 0, 20, 20) dragdropCompletion:^{ NSLog(@"Drag drop done."); }]; badgeView.text = @"6";

  • Q: Does it can be customized?
  • A: Of course, You can see the propertys provided by me.
      /** The completion block when drag drop done. */
      @property (nonatomic, copy) void(^dragdropCompletion)();
      
      /** The tint color of badge view. Default is red */
      @property (nonatomic, strong) UIColor* tintColor;
      
      /** The text of badge view. */
      @property (nonatomic, strong) NSString* text;
    

Note

you must use addSubview instead of directly use it. like

PPDragDropBadgeView* badge = [[PPDragDropBadgeView alloc] initWithFrame:CGRectMake(10, 10, 25, 25)];
badge.text = @"8";

//you must add to container first instead of [[UIBarButtonItem alloc] initWithCustomView:badge]
UIView* container = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 50, 50)];
container.backgroundColor = [UIColor clearColor];
[container addSubview:badge];

self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:container];

History

  • v2.1 (October 29, 2015)
    • Fix bug, it can on the top view some case.
    • Fix bug, it will crash when drag sometimes.
  • v2.0 (July 2, 2015)
    • Fix bug, it can scroll tableview when badage in cell.
  • v1.2 (June 18, 2015)
    • Fix bug, it does't drag when in innner viewcontroller.
  • v1.1 (May 8, 2015)
    • Fix Bug, it will crash when drag sometimes.
  • v1.0 (March 30, 2015)
    • First release.

License

The code follows MIT Lisence.

Contact

If you have any questions with use it or found some bugs, you can mail to me. I will get back to you in time. The follow is my email address: [email protected]

About

PPDragDropBadgeView is a badge view which able to drag and drop. Just like QQ 5.0 badge view.

Resources

Readme
Activity

Stars

307 stars

Watchers

13 watching

Forks

67 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.