-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
474beee
commit 1d86594
Showing
22 changed files
with
890 additions
and
264 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Xcode | ||
.DS_Store | ||
*/build/* | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
profile | ||
*.moved-aside | ||
DerivedData | ||
.idea/ | ||
*.hmap | ||
Pods/* | ||
*.app.dSYM.zip | ||
*.ipa | ||
build | ||
*.xccheckout |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "NKToggleOverlayButton" | ||
s.version = "2.0.0" | ||
s.license = 'MIT' | ||
s.summary = "NKToggleOverlayButton is a two state button that displays a translucent overlay when it's state is changed." | ||
s.homepage = "https://github.com/neilkimmett/NKToggleOverlayButton" | ||
s.screenshots = "https://raw.github.com/neilkimmett/NKToggleOverlayButton/master/animation.gif" | ||
s.author = { "Neil Kimmett" => "neilkimmett@gmail.com" } | ||
s.source = { :git => "https://github.com/neilkimmett/NKToggleOverlayButton.git", :tag => 'v2.0.0' } | ||
s.platform = :ios, '5.0' | ||
s.source_files = 'NKToggleOverlayButton/NKToggleOverlayButton' | ||
s.public_header_files = 'NKToggleOverlayButton/NKToggleOverlayButton' | ||
s.requires_arc = true | ||
end |
This file contains 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
7 changes: 7 additions & 0 deletions
7
NKToggleOverlayButton.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions
28
NKToggleOverlayButton/NKToggleOverlayButton/NKArchIndependentRounding.h
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// NKArchIndependentRounding.h | ||
// | ||
|
||
/* | ||
* CREDIT TO SIMON WHITAKER: https://gist.github.com/simonwhitaker/8213159 | ||
* | ||
* Calling math.h functions like `floor` and `floorf` on CGFloat variables | ||
* becomes problematic when compiling the same code for both 32-bit and | ||
* 64-bit platforms, since CGFloat is double on 64-bit, float on 32-bit. | ||
* Hence, if you compile with -Wconversion set, `floorf` will give a warning | ||
* on 64-bit, while `floor` gives a warning on 32-bit. | ||
* | ||
* Here's a suggested implementation of an architecture-independent `floor` | ||
* function, written using plain old function overloading which is enabled | ||
* using the `__attribute__((overloadable))` Clang language extension. | ||
* | ||
* See http://clang.llvm.org/docs/LanguageExtensions.html#function-overloading-in-c | ||
*/ | ||
|
||
float __attribute__((overloadable)) nk_floor(float f); | ||
double __attribute__((overloadable)) nk_floor(double d); | ||
|
||
float __attribute__((overloadable)) nk_ceil(float f); | ||
double __attribute__((overloadable)) nk_ceil(double d); | ||
|
||
float __attribute__((overloadable)) nk_round(float f); | ||
double __attribute__((overloadable)) nk_round(double d); |
15 changes: 15 additions & 0 deletions
15
NKToggleOverlayButton/NKToggleOverlayButton/NKArchIndependentRounding.m
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// NKArchIndependentRounding.m | ||
// | ||
|
||
|
||
#import "NKArchIndependentRounding.h" | ||
|
||
float __attribute__((overloadable)) nk_floor(float f) { return floorf(f); } | ||
double __attribute__((overloadable)) nk_floor(double d) { return floor(d); } | ||
|
||
float __attribute__((overloadable)) nk_ceil(float f) { return ceilf(f); } | ||
double __attribute__((overloadable)) nk_ceil(double d) { return ceil(d); } | ||
|
||
float __attribute__((overloadable)) nk_round(float f) { return roundf(f); } | ||
double __attribute__((overloadable)) nk_round(double d) { return round(d); } |
This file contains 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
Oops, something went wrong.