Mauricio Macri, El forjador de la nueva Gran Argentina

No Comments

photo

 

Congrats, Mr President! Hopefully Macri will be successful on his journey to take Argentina out of communism and make it a wealthy nation again. No more peronism, no more populism and no more communism. We need more right-wing people like you, Mr. Macri!

Getting your Mac to talk with NSSpeechSynthesizer

No Comments

When I got a Mac mini in 2008, one of the coolest things it could do was speaking. That is an accessibility feature, but not being disabled never prevented me from staying hours typing random stuff on terminal just to get to hear the computer talking.

It turns out we developers can use that feature too. And it just takes a few lines of code. Start by opening Xcode and creating a new project.


Screen Shot 2015-06-10 at 7.34.30 AM More

[Quickies]Getting UITextView to dismiss keyboard when the user hits the return key

No Comments

It might seem something simple, but I still remember when I was beginning my life as an iOS developer and certain things were not exactly out of the box. UITextView’s support for multiple lines puts it into a complicate situation when it comes to handle the return key. Still, that’s something you can easily implement using a delegate method.

-(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text{
if([text isEqualToString:@”\n”]){

[textView resignFirstResponder];

return NO;
}
return YES;

}

Using native Objective-C code from UIWebView

No Comments

There are many of frameworks out there like PhoneGap that allow you to write iOS apps using HTML and Javascript. Even if you know Objective-C and/or SWIFT, sometimes a UIWebView might be useful. But what if you need to use functionality that’s not available on webkit? Creating a bridge between Javascript and Objective-C is easier than you think!

Open Xcode and create a new project.

Screen Shot 2015-05-23 at 5.16.03 AM

More

[Quickies]Making an iPhone vibrate

No Comments

Making an iPhone vibrate is very easy and takes only one function. The first thing you have to do is to import the AudioToolbox framework into your project and header file(s). That framework provides two functions you can use:

AudioServicesPlayAlertSound(kSystemSoundID_Vibrate);

When the device does not support vibration(e.g. an iPod touch), the device will beep instead of vibrating. If it supports vibration, it will vibrate.

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

This function will vibrate a device that supports vibration. If the device doesn’t support it, it will do nothing.

Adding an external library on Android Studio

No Comments

When I started writing Android apps, I(just like everyone else) used Eclipse. Then Google released Android Studio, a whole new IDE designed for Android development. Things are obviously different from Eclipse. One of my first questions was “How do I import a library into my project?”. It turns out to be very easy!

To import a library click on File > Project structure.

More

Creating your first iOS app

No Comments

In this tutorial I’m going to teach you how to write your first iOS app(aka Hello World). I will assume you already know logic programming. If you’re reading this, then you’re probably not familiar with Objective-C and maybe even scared of it! Objective-C looks scary at first, but once you learn it, you won’t want to write code in any other language. It’s just easy, organised and readable. But why people find it so scary? Because of its unusual syntax! In Java, you’d write something like this:

object.method(argument);

In Objective-C, that would be:

[object method:argument];

It looks nothing like C, Java, PHP or other popular languages. But all you have to do is to open your mind and start from simple things, like this app I’m going to teach you how to write.

More

I’m on GitHub

No Comments

It toke a while to convince me to start using GitHub, but a few days ago a friend finally convinced me. I already published a few projects there and intend to publish a lot more. I will stop publishing open source projects on this blog(at least for now). Anyway, go check it out!

Emirjan Prela, the thief

No Comments

So, there I was, in a hostel in Italy. I left my backpack with my 2 MacBooks Pro, iPad, Galaxy Tab, external HD, medication and documents in the luggage storage. That would be just a normal day, if it wasn’t for an Albanian asshole called Emirjan Prela. This little piece of shit, who lives in Paris, stole my backpack with everything inside. A lot of work stuff was inside the laptops and lost. Re-doing that will be difficult. Italy is a dangerous country for a few reasons. One of them is that the police doesn’t give a fuck about crimes. Even with his name, passport number and so on, there’s nothing they will do about this. Finding where the guy lives will be difficult. But I do have his Facebook. As a bonus, I also found his girlfriend. He also has an email address. There aint much I can do, so I will just leave some pictures of the asshole. Something tells me this post might cause him trouble in the future. I wish I could find him. A skinny guy like that would get really hurt after facing me…

1404595_637376722991952_2070272503_o

More

This song describes my situation

No Comments

Certain parts of this song describe pretty much what I’m going through now. I’d like tho highlight those sentences:

You kept everything inside and even though I tried, it all fell apart

I tried so hard
And got so far

I had to fall
To lose it all

And I thought things could be different. But I’m just seeing I’m doomed and destined to certain things. :(

Older Entries