IOS

https://codehappily.wordpress.com

/ http://www.thinkandbuild.it/

http://www.raywenderlich.com/tutorials

http://www.ioscreator.com/?offset=1394697600000&reversePaginate=true

http://www.appcoda.com/ios-programming-course/

http://www.apeth.com/iOSBook/ch18.html

http://www.phonesdevelopers.com/345/1600496/88880/

Advertisements

How to give shadow in any view

uiview *mainvieww=[[UIView alloc] initWithFrame:CGRectMake(x, y, width, height)];

mainvieww.layer.borderColor=[[UIColor grayColor]CGColor];

mainvieww.layer.borderWidth=2.0f;

mainvieww.layer.shadowColor = [UIColor grayColor].CGColor;

 mainvieww.layer.shadowOffset = CGSizeMake(0, 2);

 mainvieww.layer.shadowOpacity = 2;

mainvieww.layer.shadowRadius = 2.5;

[self.view addSubview:mainvieww];

website useful

Table custom

http://wiki.remobjects.com/wiki/Displaying_Data_in_UITableViews

http://useyourloaf.com/blog/2010/10/02/dynamically-loading-new-rows-into-a-table.html

http://www.iosdevnotes.com/2011/10/uitableview-tutorial/

http://stackoverflow.com/questions/22974580/how-to-construct-a-trie-data-structure-with-objective-c

http://corporateletting.com/api/get_posts/?post_type=ad_listing&count=20&offset=0

http://code.tutsplus.com/tutorials/ios-sdk-crafting-custom-uitableview-cells–mobile-15702

https://agilewarrior.wordpress.com/2012/01/25/how-to-display-image-on-iphone-using-uiimageview-and-uiscrollview/

http://www.raywenderlich.com/29472/ipad-for-iphone-developers-101-in-ios-6-uipopovercontroller-tutorial

http://iostutorialsandusefulobjective-ctips.blogspot.in/2011/12/how-to-add-uipopovercontroller-in-ipad.html

http://iostutorialsandusefulobjective-ctips.blogspot.in/2012/01/difference-between-delegate-delegate.html

Color

http://ios7colors.com/

Popover

http://iphonedevsdk.com/forum/iphone-sdk-development/102057-uipopovercontroller-from-uibutton.html

http://www.mobile.safilsunny.com/introduction-uipopovercontroller-ios-6/

Swift

http://www.learnswift.tips/

btn

http://benscheirman.com/2011/09/creating-a-glow-effect-for-uilabel-and-uibutton/

AFNetwork

https://www.youtube.com/user/learningios/videos

https://www.youtube.com/user/LearnEDU/playlists

http://samwize.com/2014/05/10/tutorial-on-using-afnetworking-2-dot-0/

http://cocoadocs.org/docsets/AFNetworking/2.1.0/

DataBASe

File ADD

NSString *strpath = [NSHomeDirectory() stringByAppendingPathComponent:@”/Documents/Database_Sample1.sqlite”];

    NSLog(@”%@”,strpath);

    NSError *err;

    if (![[NSFileManager defaultManager]fileExistsAtPath:strpath])

    {

        NSString *str1 = [[NSBundle mainBundle]pathForResource:@”Database_Sample1″ ofType:@”sqlite”];

        [[NSFileManager defaultManager]copyItemAtPath:str1 toPath:strpath error:&err];

        

    }

    else{

        NSLog(@”Already Exist..”);

    }

.h file

#import <Foundation/Foundation.h>

#import <sqlite3.h>

@interface sqliteconnecton : NSObject

{

    NSMutableArray *data;

}

-(NSMutableArray *)selectrecord:(NSString *)dbpath SelectQuery:(NSString *)query ;

-(NSString *)IUDrecord:(NSString *)dbpath SelectQuery:(NSString *)query ;

.m file

#import “sqliteconnecton.h”

#import <sqlite3.h>

@implementation sqliteconnecton

-(NSMutableArray *)selectrecord:(NSString *)dbpath SelectQuery:(NSString *)query{

    

    data = [[NSMutableArray alloc]init];

    sqlite3 *db;

    

    

    int i;

    if (sqlite3_open([dbpath UTF8String], &db)==SQLITE_OK)

    {

        NSString *strqury = query;

        NSMutableDictionary *dict1;

        sqlite3_stmt *statementss;

        if (sqlite3_prepare_v2(db, [strqury UTF8String], –1, &statementss, nil)==SQLITE_OK)

        {

            while (sqlite3_step(statementss)==SQLITE_ROW)

            {

                dict1 =[[NSMutableDictionary alloc]init];

                for (i=0; i<sqlite3_column_count(statementss); i++)

                {

                    

                    NSString *strcolumnname = [NSString stringWithUTF8String:sqlite3_column_name(statementss, i)];

                    NSString *strcolumndata = [NSString stringWithUTF8String😦char *)sqlite3_column_text(statementss, i)];

                    [dict1 setObject:strcolumndata forKey:strcolumnname];

                }

                [data addObject:dict1];

            }

        }

        sqlite3_close(db);

    }

    return data;

}

-(NSString *)IUDrecord:(NSString *)dbpath SelectQuery:(NSString *)query{

    sqlite3 *d1;

    NSString *message;

    if (sqlite3_open([dbpath UTF8String], &d1) == SQLITE_OK)

    {

        NSLog(@”Database Open”);

        sqlite3_stmt *completedStatement;

        

        if (sqlite3_prepare_v2(d1, [query UTF8String], –1, &completedStatement, NULL) == SQLITE_OK)

        {

            if (sqlite3_step(completedStatement) == SQLITE_DONE)

            {

                message = @”Success”;

               sqlite3_close(d1);

            }

            else

            {

                message = @”error”;

            }

        }

        else {

            message =@”error”;

        }

        

    }

    return message;

}

@end

Insert update delete with demo

sqliteconnecton *sqlConnection=[[sqliteconnecton alloc] init];

     NSString *strpath = [NSHomeDirectory() stringByAppendingPathComponent:@”/Documents/Database_Sample1.sqlite”];

    /*********************** Select Query *********************/

    

    /*********************** Insert Update Delete **************/

    NSString *q1=@”insert into user_Master values(null,’ddd’,’dd’)”;

    NSString *str=[sqlConnection IUDrecord:strpath SelectQuery:q1];

    if ([str isEqualToString:@”Success”]) {

        NSLog(@”Inserted”);

    }else{

        NSLog(@”Error inserting”);

    }

    

    

    NSString *strDEl=@”delete  from user_Master where (user_id =1)”;

    NSString *str1=[sqlConnection IUDrecord:strpath SelectQuery:strDEl];

    if ([str1 isEqualToString:@”Success”]) {

        NSLog(@”Deleted”);

    }else{

        NSLog(@”Error deleting”);

    }

    NSString *q=@”select * from user_Master”;

    NSMutableArray *arr=[sqlConnection selectrecord:strpath SelectQuery:q];

    NSLog(@”%@”,arr);