Everyone loves Smarties! And much the same way Smarties Candies make you smarter… today we are talking about Code Snippets that make you….er Smarter! More than a source of cut/paste Objective C source code, this is meant to be a quick reference. As such, some of these will be incomplete and I will be filling them up as I go along. 1) UIAlertView UIAlertView *internetAlert = [[UIAlertView alloc] initWithTitle:@”No hay farmacias” message:@”Favor cambie sus parámetros” delegate:self cancelButtonTitle:@”Cancelar” otherButtonTitles:@”Ok”, nil]; [internetAlert show]; 2) NSNotification //1. Register as observer of notifications in viewDidLoad [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveTestNotification:) name:@”TestNotification” object:nil]; //2. NSNotifCtr CLEANUP in viewDidUnload [[NSNotificationCenter defaultCenter] removeObserver:self]; //4. Post notif to NSNotif in… Read More
Continue ReadingFirst Google Glass App – Part 8 – Hello Glass!
Jumping right in, let’s create a Glass GDK project from scratch: Create New Android Project Configure GDK Imports Code qwe To create a new project…See our Part 1 of the tutorial. Make sure to configure the Glass GDK Sneak Peek Manually if it didn’t get configured by Android Studio or Eclipse on set up. As it turns out, even if you create a project setting GDK as the Compile for API, it doesn’t get created as such. You must double check in your build.gradle file (CAREFUL, there are 2 such files. You need to modify your inner most gradle file) and make sure it looks something like this: And you… Read More
Continue ReadingiOS7 Sprite Kit for Game Design for iPhone & iPad
iOS 7 Series – Sprite Kit Welcome to iOS7 and to start off, I want to kick things off with SpriteKit. Although it deals with video games, many companies are using iOS apps as a marketing tactic to engage their users in an effort to promote their products. SpriteKit is the most prominent feature in iOS7 so we’re going to take a quick tour. Go ahead and create a New Project in XCode5 and select the SpriteKit template (the bottom right icon): Click next and fill in your project data. Once you are in the main XCode window notice we have the following files in the Project Navigator: 1) AppDelegate… Read More
Continue ReadingGlass Development Mirror API – Part 4 – Where to start after setting up!
So you have Glass and you want to develop apps for it? You already have an IDE such as Eclipse or Android Studio to code your apps in, you know all about adb and Droid@Screen to view your Glass screen on your computer screen! Well you do have options, before jumping into your typical Hello World Glass app. As with other platforms like iOS, you have the option of native apps and web based services apps. This last option is basically an app that runs on a server(s) and interacts directly with your device (be it Glass or iDevice) by sending it information. Native – GDK – Apps These are… Read More
Continue ReadingStatic Libraries in iOS – Video Tutorial
Libraries is another one of those rather obscure topics for newbie programmers, kinda like Blocks and Delegates/Protocols. Think of libraries as just that, a resource you can use which doesn’t belong to you. A loaner 🙂 NOTE: If you need a nice tutorial on Blocks or Delegates, check out: Video Tutorial: Objective-C Blocks Video Tutorial: Objective-C Protocols and Delegates Ok back to our tutorial! Well a library is a piece of code that you can use (by importing it into your projects) but its not yours, so you can’t really do what you want to that piece of code, except use its functionality. In this tutorial we will create our… Read More
Continue ReadingGoogle Glass & Android Series for Developers & Users
So I’ve gotten a little carried away with the Glass-Android thing. My posts are as disorganized as my thoughts, so I thought I’d organize my posts a bit. Here is the set of posts for Android & Glass Development as of Feb 15th, 2014: Google Glass Review – Part 1 – 什么 (shen me = what = what Glass is & isn’t) Google Glass Review – Part 2 – Pros & Cons Develop apps for Google Glass – Part 3 – Setting up! Glass Development Mirror API – Part 4 – Where to start after setting up First Android App – Part 5 First Android App – Part 6 First Google… Read More
Continue ReadingHow to Read iOS or Mac OS Programming Documentation
The toughest part for me to get started was reading the Apple Documentation on iOS or MacOS. When I got into more APIs it got more complex. You need to understand how to read API or proprietary code documents in order to understand how to create a piece of code, connect to web services or debug changes in code. You will very often see the term DEPRECATED, which means a particular method name is no longer used. This is very important so let’s take a look at Apple Docs first: This tells us that the object of type NSArray has many methods that you can call on it. They may… Read More
Continue Reading