Open
Conversation
Update code to Swift 3
-Fix issue that badges are not properly display/disappear on button when working with Xcode 8.0
-Badge now can stick to 4 different position on button here i call it anchor, these position are TopLeft, TopRight, BottomLeft, BottomRight and Center. Those anchors have offset values e.g when anchor set to TopLeft have 2 valid offset values, left and top respectively. You can either use offset value to do minor position adjustment or leave it zero which will no effect. "badgeEdgeInsets" property is still taking into count when calculating X Y for badge, therefore, this become 4 different options when working with badge. 1.Leave both "badgeEdgeInsets" or anchor offset to zero, this lead to badge's center been placed at 4 different position on button 2.Change "badgeEdgeInsets" to do minor adjustment 3.Change anchor offset to do minor adjustment 4.Combine "badgeEdgeInsets" with anchor offset -Class become designable and some properties are inspectable which mean badge's properties can be adjust in Interface Builder and visual of badge will automatically update base on those properties
…et-available-in-objective-c Make `badgeEdgeInsets` property available in Objective C
…geButton-Swift into NPContribution-BadgeAnchor # Conflicts: # Classes/MIBadgeButton.swift # MIBadgeButton/Base.lproj/Main.storyboard
*Total -- 360.36kb -> 250.00kb (30.63%) /MIBadgeButton/Images.xcassets/LaunchImage.launchimage/iOS Simulator Screen Shot Aug 10, 2015, 6.27.14 PM.png -- 15.00kb -> 0.59kb (96.04%) /screenshot.png -- 65.62kb -> 29.15kb (55.57%) /MIBadgeButton/Images.xcassets/1.imageset/1.png -- 136.42kb -> 82.07kb (39.84%) /MIBadgeButton/Images.xcassets/facebook.imageset/1408848343_facebook_circle_color.png -- 3.18kb -> 2.26kb (28.8%) /MIBadgeButton/Images.xcassets/twitter.imageset/1408848408_twitter_circle.png -- 4.79kb -> 3.54kb (26.05%) /MIBadgeButton/Images.xcassets/OS-X-Yosemite-for-iOS.imageset/OS-X-Yosemite-for-iOS.jpg -- 115.65kb -> 112.78kb (2.49%) /MIBadgeButton/Images.xcassets/pinterest.imageset/1408848335_pinterest-icon-circle-red.png -- 1.94kb -> 1.91kb (1.76%) /MIBadgeButton/Images.xcassets/swift-logo-hero-2.imageset/swift-logo-hero-2.jpg -- 17.75kb -> 17.69kb (0.34%) Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.