Friday, 22 August 2014

Protocol - Sample Code for iPhone

1. Create a File for Objective - C Protocol and Click the Next Button

2. And Type the File Name as "Main_Control” and Click the Create Button

3. Write the Below Codes
     Main_Control.h
     #import <Foundation/Foundation.h>

     @protocol Main_Control <NSObject>

     #define RGB(r, g, b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1.0]
     #define URLSTRING @"http://www.asanhussain.blogspot.in"

    @end

4. Where u want URLSTRING & RGB(r, g, b) - First thing you have added a header file & Use the Defined values

No comments: