iPhone Tutorial: Sliders

Today, we will examining sliders. The UISlider will change the value of a a UILabel, or text.

First, let’s start by creating a new view-based application project. For this tutorial, I will name it “Slider.”

In SliderViewController.h

After implementation

Add the following…

IBOutlet UISlider *mainSlider;
IBOutlet UILabel *mainLabel;

…Below brace and before @end, add this…

- (IBAction)labelChanged;

Now that our outlets and actions are complete for the project, let’s go into our SliderViewController.m

Add the following…

- (IBAction)labelChanged {
mainLabel.text = mainSlider.value];
}

Now that our code is finished. (Yay!)

Let’s open our SliderViewController.xib to fix up our view.

When you have the view open, go into the Interface builder library and drag both a UISlider and UIlabel onto the screen. Doesn’t matter where, but visible.

Now go into the inspector/connections when you click file’s owner in the view containing the view, first responder, and file’s owner.

From this point, connect mainSlider outlet to the slider. Then mainLabel outlet to the label.

Lastly, then connect labelChanged action to the slider, and a list of options will come up. Click the option “value changed.”

The value changed option means that action being called will have a value changing return.

Now you can build and run. Our final result should be when you scroll the slider, the label value will change.

-Sebastian Shanus

Popularity: 6% [?]

Using the Quick Selection tool in PhotoShop

When your just starting out in photoshop just selecting things in photoshop can be very hard to figure out. But thats what here for :) so lets just start off small and introduce you to one tool at a time. This time we are going to look at the Quick Selection Tool.

Popularity: 9% [?]

How to add Facebook chat to iChat

Facebook has its own chat at the bottom of all the pages that you visit when your logged into their site. This is really handy when you want to talk to a person quickly. But what if you dont wanna keep a window or tab open for Facebook to chat? You can set up iChat or Adium (a free IM client for mac). So go to your preferences in iChat and add a jabber account.

Now that your at this window add in the account name your account name you set up on facebook (found on your settings page) followed by @chat.facebook.com then your password stays the same. So it will be “username@chat.facebook.com” Click the little down arrow that says “server options” and for the server field put “chat.facebook.com” and for the port type “5222″ and SSL off. Click okay and your set!

Popularity: 33% [?]

Utilizing Gradients: Making a Pencil

Finished Product

To make a simple pencil in illustrator one may think to just use different shapes with different colors. While this is effective, without proper use of gradients you may get this “blah” kind of pencil with no real depth.

To start off we’re goin to use some simple shapes but if you don’t want to run into problems with the layering you might want to draw them in a specific order: first draw the tip of the pencil (the bottom two pieces), then the shaft, followed by the eraser, and finally, the metal eraser housing.

Lets work on the simpler gradients first. For the eraser, a light pink to a darker pink linear gradient is used. The led, a dark grey to black linear gradient. And the pencil tip is a light wood color to a darker wood color linear gradient.

Now for the matal eraser housing. For the main gradient go to your swatches libraries menu choose gradients then metals. I find that the silver gradient looks best. If you’d like, tweek this gradient a little to make it your own. Now copy (ctrl [command] + C) and paste-in-front (ctrl [command] + F) this shape and make it shorter; switch out the lighter colors in the gradient with darker ones. Holding alt (option) and draging the shape down will make a copy of it. Now add four, medium-grey ovals to finish off the eraser housing.

The gradient for the shaft of the pencil gets a little more complicated. Choose a linear gradient and make four stops with different shades of the same color. Now drag the top gradient sliders all the way to the right.

Using the warp tool at the bottom of the shaft make a random cutting pattern.

Finally click the pencil tip and go to Effect > Stylize > Inner Glow; select a darker color; make sure the mode is set to multiply, opacity to 75, and blur to 5; check edge and press Ok.

To finish off the pencil group all of the objects together by selecting them all and pressing ctrl (command) + G. Give your pencil a nice drop shadow (Effect > Stylize > Drop Shadow) and your done!

Now you can add some text on the side and a “2″ to really make it look like a pencil. And I’m sorry about the random green, I’m slightly color blind. Lol

Popularity: 21% [?]

Beginning C++: Tutorial 1

Welcome to the beginning C++ programming tutorials. In this series you will learn how to get started programming in C++. C++ is a very large programming language. Many people go crazy thinking they need to know EVERYTHING! Please, do not think you need to know every single line of code in c++. You might go crazy. But learning what you need to know, and what you want to know always turns out much better. All of the good C++ programmers say that they only learned what they needed to know. Well, what do you need to know? It depends, are you going to get into game programming? Visual development? It takes some time knowing what you want to do, but in this series, I will teach you the basics of the ANSI Standard library used in almost all the types of programming.

Enough of the lecture, let’s get started! First off, you need an IDE. I recommend you download either Microsoft Visual C++, Eclipse C++, or Dev C++. They are all free. Once you have those downloaded, create a new project for console.

#include <iostream>

int main()
{
std::cout << “I am a C++ Programmer!”;
return 0;
}

In this block of code, we have our first line which is

#include

this is code to include the standard library. In later tutorials we will go into what the “#” means, but for now it is essential for your program to work.

Next we had…

int main()
{
return 0;
}

All C++ programs have a main function which is, main().
The “int” before main is something to tell the compiler that the function is going to return a value. We will cover this later when we get into functions.

Return 0

This means that the program, when run successfully, will return a value of 0. If not, then return a value of 1.

std::cout << “I am a C++ Programmer!”;

std means that it is referring to the standard library. The two :: shows that a function from the library will come from that library.

Like the one we have here.

cout << “I am a C++ Programmer!”;

cout stands for console-out. Which will output text to the console. It will output what is in quotes. But the two << means that the console text is going out. Later on we will review what >> is used in.

Summary

Today, we learned a little bit about the C++ programming language, and wrote our first small program using standard library.

Write it!
1.) Write a program that will output, “My name is (yourname) and I am officially a c++ programmer!”

-Sebastian Shanus

Popularity: 88% [?]

Installing Admob into your iPhone apps

When I was trying to install ads in to one of my iPhone apps it was pretty hard to try and do, but I finally got it so I thought I would share with you guys how I did it. You can do it two ways; programmatically or through Interface Builder. I did this through Interface builder because that is the much easier way to do this.

Popularity: 19% [?]

Methods, and instances in Objective-C. (Part 2)

In our last objective-c tutorial we tackled the @interface section; this tutorial we are going to tackle the @implementation section. This part of the a program is where you tell the complier what we wrote in the @interface section mean. (To see the whole tutorial on that click here.) For example in our @interface section in our last tutorial we wrote:

@interface Fraction : NSObject

{

int num;

int dem;

}
-(void) print;

-(void) setNum: (int) n;

-(void) setDem: (int) d;

@end

In the @implementation section we are going to actually tell the complier what -(void) print; and the other method (and method arguments) mean. Lets start actually writing the @implementation section. I’m going to show you the whole @implementation section and then I will explain it.

@implementation Fraction: NSObject

-(void) print

{

NSLog(@”%i/%i”, num, dem);

}

-(void) setNum: (int) n

{

num = n;

}

-(void) setDem: (int) d;

{

dem = d;

}

@end

So lets start with the  beginning. You will always start this section off saying “@implementation Class”. For our example we ill say “@implementation Fraction”.  You will always put the class name right after @implementation. If you do not do that the complier will give you an error saying “Hey what class are you talking about?!” After that you can see in our full example above I added NSObject after the class name. You dont have to do this, I did it for good practice and to remind myself what superclass we are working with here. After you declare that we are working in the @implementation section we can actually tell the complier what our methods are going to do. This makes it much easier with things like telling the program to display NSLogs. You can type the method name instead of actually writing out the code in the program section. In the program section you could just type “[myFraction print];” instead of typing out “NSLog(@”Your fraction is:%i/%i, num, dem). More on what that actually means in our third part of our tutorial series. So that is exactly what we type here giving it the print name. Then below that you see

-(void) setNum: (int) d;

{

dem = d;

}

The setNumerator: method stores the integer argument you called n in the instance variable numerator. Similarly, setDenominator: stores the value of its argument d in the instance variable denominator. We are just setting dem equal to d. Similar to setNum. As we did for the last section we are going to end this with the @end. Thats it for this tutorial. Part 3 should be up by monday or tuesday.

Popularity: 15% [?]

Review: Echofon For Mac

Here is another  client, but its just not you ‘usual’ Twitter client. This one is like Tweetie, very simple clean and cut. Echofon does not take up much screen space which is a huge factor in my book. Something like tweetdeck that will take up your whole screen isnt something I am really fond of. I would really rather have echofon rather than tweetdeck for that one reason. But dont let the small factor fool you it has many features. Lets take a look at a picture.

As you can see its very simple. You have your Timeline for the people your following, mentions, direct messages, lists, and search. Its a compact view, If you want to look at their profile you can click that  profile picture in the time line and a drawer will open. In the image above you see that I’ve pointed a blue arrow at something in the timeline. Thats the new Twitter Retweet feature. Echofon has  for it and it looks slick! You can still choose to retweet the way old that echofon calls “RT with comment” which follows: RT @thatperson. But the new way just makes it much easier for other people to see the original tweet.


From the drawer menu you can see all their tweets, whos following them and who they are following, you can also block, unblock, follow, unfollow, reply, and DM a user. Right below that they have added support for twitter lists, you can see what lists these people are a part of and what lists they made.

Search
: The last  I want to talk about is the search, now this is the coolest thing they could do for the search ‘home.’ Echofon automatically pulls all the trending topics from Twitter and puts them as the home for the search menu. You can click any of these and look further into them. It pulls the 10 latest trending topics from twitter.

Conclusion: All in all I think this twitter client has many ways to come, but then again its only in beta. I think once it becomes around 1.5 this twitter client is going to be big, even bigger than tweeite. I think the best part of this twitter client is the developers behind it are avid. They are always fixing bugs and always implementing new twitter features.
Download link
Website

[ad]

Popularity: 60% [?]