Skip to content

Instantly share code, notes, and snippets.

View tapsandswipes's full-sized avatar

Antonio Cabezuelo Vivo tapsandswipes

View GitHub Profile
@tapsandswipes
tapsandswipes / iOS installed fonts
Created July 6, 2016 08:12
Print names of all installed fonts in a iOS device
UIFont.familyNames().forEach {
print("\($0)")
UIFont.fontNamesForFamilyName($0).forEach {
print("== \($0)")
}
}
@tapsandswipes
tapsandswipes / gist:26ae01329c08062bdbf2
Created January 12, 2016 18:09
XCTest: Testing async callbacks
import XCTest
@testable import MyApp
class CallbackTest: XCTestCase {
func testAsyncCalback() {
let service = SomeService()
// 1. Define an expectation
let expectation = expectationWithDescription("SomeService does stuff and runs the callback closure")

Keybase proof

I hereby claim:

  • I am tapsandswipes on github.
  • I am acvivo (https://keybase.io/acvivo) on keybase.
  • I have a public key whose fingerprint is B3A6 485F 4D1F 85E5 C167 BD9D AF30 D6A3 F21A 3C10

To claim this, I am signing this object:

@tapsandswipes
tapsandswipes / gist:7e10da769b07c030c1e4
Last active August 29, 2015 14:01
Show/Hide chrome in UINavigationViewController on iOS 7
@property (nonatomic, assign, getter = isChromeHidden) BOOL chromeHidden;
- (BOOL)prefersStatusBarHidden {
return self.isChromeHidden;
}
- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation {
return UIStatusBarAnimationSlide;
}
@tapsandswipes
tapsandswipes / ResetTag
Last active July 13, 2023 07:52
Reset tag in git
git push origin :refs/tags/<tagname> // Delete tag from remote
git tag -fa <tagname> // Reset tag to current commit
git push origin master --tags // Push tag to remote