Skip to content

Instantly share code, notes, and snippets.

View phynet's full-sized avatar
🤘
I said yeah.

Sofia Swidarowicz phynet

🤘
I said yeah.
View GitHub Profile
@phynet
phynet / Change tint color for status bar to WHITE with SWIFT.mkd
Last active March 16, 2016 05:51
Change tint color for status bar to WHITE with SWIFT

Put this inside your app info.plist:

  • View controller-based status bar appearance = NO

  • Status bar style = UIStatusBarStyleLightContent

And inside AppDelegate

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

@phynet
phynet / image-right-side-button.m
Created May 26, 2016 11:44
Switch image to the right side of the button - iOS
//Switch image to the right side of the button
self.mapButton.transform = CGAffineTransformMakeScale(-1.0, 1.0);
self.mapButton.titleLabel.transform = CGAffineTransformMakeScale(-1.0, 1.0);
self.mapButton.imageView.transform = CGAffineTransformMakeScale(-1.0, 1.0);
@phynet
phynet / git-commit-amend.mkd
Created July 5, 2016 14:33
Rewrite message in remote commit
git commit --amend

git push --force-with-lease

@phynet
phynet / AppleWatch-Table.md
Last active July 12, 2016 08:02
Create Table Apple Watch with swift 2
    override func awakeWithContext(context: AnyObject?) {
        super.awakeWithContext(context)
        
        let arrayValues = ["Sofia", "Oriana", "Helena", "Maria"]
        
        table.setNumberOfRows(arrayValues.count, withRowType: "TableRowControllerID") //ID that with use in XIB to identifier the table
        
 for (index, arrayVal) in EnumerateSequence(arrayValues){
@phynet
phynet / dictionary-with-dynamic-keys.js
Last active July 18, 2016 19:23
How to create dynamic keys in JS...order by same keys
/*
Entry:
[ { key: 'activar_reserva_email',
ES: 'Email que usarás en la aplicación ',
EN: 'The email address you will use on the application' },
{ key: 'activar_reserva_cuenta_no_registrado',
ES: 'La cuenta donde quieres recibir los pagos',
EN: 'The account where you wish to receive your payments' },
{ key: 'activar_reserva_boton_no_registrado',
@phynet
phynet / install-cl-js.js
Last active July 18, 2016 19:28
Using node to install something using command line
//Using npm command packgae
var npm = require('npm');
npm.load(function(err) {
npm.commands.install(['ffi'], function(er, data) {
// log errors or data
});
npm.on('log', function(message) {
console.log(message);
});
});
Make shortcut keyboard to open Terminal from Mac osx
https://claudiodangelis.com/2012/osx-launch-terminal-from-shortcut/
@phynet
phynet / Using UIAlertController with NSLocalizedString.md
Last active August 2, 2016 08:02
Using UIAlertController with NSLocalizedString

##Using UIAlertController with NSLocalizedString Because I tend to localize everything in my apps, UIAlertController needed to be localized as well. So, I wrote a struct to simplify the way I use NSLocalizedWithString (which happens to be a long piece of code), and so I could use it in all my classes.

Use an extension (remember, an extension is like a category in Obj-c)

extension String {

   var localized: String {
      return String.localizedStringWithFormat(NSLocalizedString(self,comment: ""))

}

@phynet
phynet / delete-tag-remote-repo.md
Created August 2, 2016 08:42
Delete tag from remote repo
git tag -d release01

git push origin :refs/tags/release01

@phynet
phynet / Dev-config.md
Last active August 4, 2016 09:49
My Config for iOS developing

##Tools I'm using to develop

###Code Editors

  • Atom for Node and JS
  • Sublime for Ruby, Node, JS
  • Text Wrangler everything else

iOS Editor