Results 1 to 10 of 10

Thread: Iphone Dev (objective-c) Tutorials

  1. #1
    Join Date
    Dec 2005
    Posts
    1,951
    Rep Power
    0

    Default Iphone Dev (objective-c) Tutorials

    Tutorial 1 Hello TechJamaica
    Open Xcode and Start a new Project


    After choosing view Based Application give you project a name.
    I gave it "HelloTechJamaica" without the quotes.


    After choosing name, xcode will open the project directory. Save the TechJamaica logo and convert to .png file. After converting place it in the resources folder of the project directory.



    Open the resources folder and double click the HelloTechJamaicaViewContoller.xib file



    Opening that file will open the Interface builder application.


    Clicking on the window or view will bring up the attributes and library tools.
    Pc= Hp dv6t

  2. #2
    Join Date
    Dec 2005
    Posts
    1,951
    Rep Power
    0

    Default

    PART 2
    From the library drag the ImageView object onto the builder screen. Click on the image view object go into the attributes tools where youll set the TJ image. And drag a Round button and type "Say Hello" on it.



    After doing all of that it should look like this.


    After doing all of that save and close. And switch back to XCODE. Open the classes folder. Double click HelloTechJamaicaViewContoller.h and add the following code.
    Code:
    -(IBAction)userSayHello:(id)sender;
    Pc= Hp dv6t

  3. #3
    Join Date
    Dec 2005
    Posts
    1,951
    Rep Power
    0

    Default

    PART3
    Then in the same classes folder open the HelloTechJamaicaViewContoller.m file. And add the following code anywhere but i like to add it below the viewDidUnload function.


    Code:
    -(IBAction)userSayHello:(id)sender
    {
    	UIAlertView *myalert=[[UIAlertView alloc]initWithTitle:@"------------" message:@"HELLO TECHJAMAICA.COM" delegate:nil cancelButtonTitle:@"Continue" otherButtonTitles:nil];
    	
    	[myalert show];
    	[myalert release];
    }
    Save the project and reopen the HelloTechJamaicaViewContoller.xib file.
    Its now time to drag the coding on to UI Literally.
    Look to the top left and right click Files's Owner. Under recieved actions drag the Sayhello fucntion unto the button and release. And click touch up inside. Save the interface file and close. Go back into XCODE and click the build and go button.



    ********************FINAL PRODUCT*************************
    Pc= Hp dv6t

  4. #4
    Join Date
    Dec 2005
    Posts
    1,951
    Rep Power
    0

    Default

    This tutuorial is for the people who are just starting iphone dev, for the more advnace this project would take 3 mins to complete. I'm not a expert but im good enough. This is a beginner app. Tomorrow ill post a intermediate and a advance couple days later.
    Sorry, i'm using a HackinTosh 10.6.0 on a clevo m570ru laptop with a 1920 x 1200 resolution so the pics may be a little huge for people with small laptop resolutions.
    Last edited by mobile_fan_2k5; Aug 2, 2010 at 12:01 AM.
    Pc= Hp dv6t

  5. #5
    Join Date
    Dec 2005
    Posts
    1,951
    Rep Power
    0

    Default

    Project 2- Working with multiple views

    youtube video about views
    Every iphone app has only one window. But there can be an infinite amount of views layered under the main window.

    Example of this with coding. This is an example of hiding multiple views using actions.

    A typical header file with an instance of 3 views and an action call ViewsControl and a button.
    Code:
    //  Created by Andre Piper on 8/3/10.
    //  Copyright AP ltd 2010. All rights reserved.
    //
    
    #import <UIKit/UIKit.h>
    
    @interface BtnV2ViewController : UIViewController {
    	IBOutlet UIView *view1;
            IBOutlet UIView *view2;
            IBOutlet UIView *view3;
            IBOutlet UIButton *myButton;
    }
    -(IBAction)ViewsControl:(id)sender;
    Actual coding
    Code:
    -(IBAction)ViewsControl:(id)sender
    {
    if([mybutton isTouchInside])
    {
    	
    	[view1 setHidden:FALSE];//black
    	[view2 setHidden:TRUE];//green
    }
    	else
    	[view3 setHidden:FALSE];//gold
    	
    }
    The above coding unhides view1,view3 and hides view2.

    ********BEFORE***********



    ********AFTER***********

    The middle view disappears.
    Last edited by mobile_fan_2k5; Aug 4, 2010 at 08:48 PM.
    Pc= Hp dv6t

  6. #6
    Join Date
    Jul 2007
    Posts
    16,974
    Rep Power
    33

    Default

    Nice tutorial man. keep up the good work.
    SLAPPA Phenom II AM3 Overclocking Essentials
    I HAVE HIGHEST OC ON TECHJA 4.2ghz
    4890oc beats gtx 285
    PS3 FAILCAKE
    ps3 only advantage is bluray
    4890 oc roundup
    http://miniprofile.xfire.com/bg/sh/type/0/skugpezz.png
    Mi know dem fear mi!!!!! Gigabyte 790x ud4p
    phenom 2 955@3.8ghz 24/7 stable , 4GB ddr3 1333@1.5ghz ,3850 256MB (temp card) (4890 soon),700 watt dual rail psu, (overclocking rules) my avatar represents my personality

  7. #7
    Join Date
    Dec 2005
    Posts
    1,951
    Rep Power
    0

    Default

    Ratings....but bwoy, mi affi park this for a while have some windows projects a deal with.
    Pc= Hp dv6t

  8. #8
    Join Date
    Jul 2007
    Posts
    16,974
    Rep Power
    33

    Default

    Still parking?..........
    SLAPPA Phenom II AM3 Overclocking Essentials
    I HAVE HIGHEST OC ON TECHJA 4.2ghz
    4890oc beats gtx 285
    PS3 FAILCAKE
    ps3 only advantage is bluray
    4890 oc roundup
    http://miniprofile.xfire.com/bg/sh/type/0/skugpezz.png
    Mi know dem fear mi!!!!! Gigabyte 790x ud4p
    phenom 2 955@3.8ghz 24/7 stable , 4GB ddr3 1333@1.5ghz ,3850 256MB (temp card) (4890 soon),700 watt dual rail psu, (overclocking rules) my avatar represents my personality

  9. #9
    Join Date
    Dec 2005
    Posts
    1,951
    Rep Power
    0

    Default

    just finish up my field group project so i can continue coding now. Will post some more stuff in the proper order this time. From basic objective c to open gl es. I'll be learning along the way also.

    Like this syllabus from standford.
    9/21 - Introduction, Class Logistics, Overview of iPhone SDK, MVC
    9/23 - More MVC, Xcode, Interface Builder and first application
    9/24 - Downloading the SDK and using the debugger

    9/28 - Objective-C
    9/30 - Foundation (arrays, dictionaries, etc.), Memory Management

    10/5 - Delegation, Custom Views
    10/7 - Application and View Controller lifecycle, Navigation Controller

    10/12 - Controllers of Controllers, Universal Applications
    10/14 - iPad, Gesture Recognizers

    10/19 - UIImageView, UIScrollView
    10/21 - UITableView, UITableViewController

    10/26 - Persistence: Core Data, Property Lists, Archiving
    10/28 - More Core Data, Grand Central Dispatch, Notifications

    11/2 - Final Project Overview
    11/4 - Core Location, Map Kit, Web Kit

    11/9 - Modal Views, Text Input
    11/11 - Media (audio, video, iPod)

    Standford Iphone Developement Course CS193P


    It has some really nice stuff online.

    Reading the syllabus i figured out that i was jumping the gun when doing this tutorial. I jumped from Alerts to Views in no time. Which is bad when trying to tutor.
    Pc= Hp dv6t

  10. #10
    Join Date
    Jul 2007
    Posts
    16,974
    Rep Power
    33

    Default

    I think you should start a blog.
    You wasting time here.
    Start a blog and get noticed.
    https://www.blogger.com/signup.g
    SLAPPA Phenom II AM3 Overclocking Essentials
    I HAVE HIGHEST OC ON TECHJA 4.2ghz
    4890oc beats gtx 285
    PS3 FAILCAKE
    ps3 only advantage is bluray
    4890 oc roundup
    http://miniprofile.xfire.com/bg/sh/type/0/skugpezz.png
    Mi know dem fear mi!!!!! Gigabyte 790x ud4p
    phenom 2 955@3.8ghz 24/7 stable , 4GB ddr3 1333@1.5ghz ,3850 256MB (temp card) (4890 soon),700 watt dual rail psu, (overclocking rules) my avatar represents my personality

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •