Giter VIP home page Giter VIP logo

easynotificationbadge's People

Contributors

afnanm1999 avatar domenicbianchi01 avatar jerome1210 avatar kf99916 avatar mglass avatar minitour avatar mohemian-92817281 avatar orsanawwad avatar saeed-rz avatar xzenon 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

easynotificationbadge's Issues

Getting crash

I was using it for add badge on barbuttonitem . but its not working
I am getting crash on the
fatal error: unexpectedly found nil while unwrapping an Optional value

Badge's views appearing below.

Badges appear correctly first time.

However, the problem happens when you return from a pushed UIViewController from NavigationViewController.

screen shot 2017-11-22 at 4 24 38 pm

Only happens in devices running iOS 11 [Xcode 9.1].

Thank you for the library ๐Ÿ˜

Value of type 'BadgeAppearance' has no member 'textSize'

Updated podfile from:
pod 'Koloda', '-> 4.3.1' to:
pod "Koloda"

After that badgeAppearance.textSize = 14 gives the follow message: "Value of type 'BadgeAppearance' has no member 'textSize'".

Downloaded GitHub repository and tested example project and got same behavior.

Was the removal of textSize property intended?

Unable to set CenterX and CenterY to 0

It is not possible to set the centerY (and centerX) offsets to 0. The following code prevents this. However 0 is a valid value to center align precisely.

 //The distance from the center of the view (vertically)
let centerY = appearance.distanceFromCenterY == 0 ? -(bounds.size.height / 2) : appearance.distanceFromCenterY

 //The distance from the center of the view (horizontally)
let centerX = appearance.distanceFromCenterX == 0 ? (bounds.size.width / 2) : appearance.distanceFromCenterX

A workaround is to set distanceFromCenterY or distanceFromCenterX to a very small non zero value such as 0.01 but it feels yucky!

UIBarButtonItem badge

Description
I've tried to set badge to UIBarButtonItem but badge is not visible.

Code I've used

let filterButton = UIBarButtonItem(image: #imageLiteral(resourceName: "filter"),
								   style: .plain,
								   target: self,
								   action: nil)
filterButton.tintColor = .primary
filterButton.badge(text: "2")

image


Workaround
Instead of creating UIBarButtonItem with image create it using customView constructor

let filterButton = UIBarButtonItem(customView: UIImageView(image: #imageLiteral(resourceName: "filter")))
filterButton.tintColor = .primary
filterButton.action = #selector(filter(_:))
filterButton.customView?.badge(text: "2")
navigationItem.rightBarButtonItem = filterButton

Thanks for great lightweight library.

Best regards,
Najdan

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.