fix some compilation errors due to failure to convert from CGFloat to float, and some code refactoring
fix some compilation errors due to failure to convert from CGFloat to float, and some code refactoring

mustafaibrahim989/MIBadgeButton-Swift,mustafaibrahim989/MIBadgeButton-Swift