Showing posts with label xcode. Show all posts
Showing posts with label xcode. Show all posts

Tuesday, 6 November 2012

remove the background color from search bar in iPhone

for (UIView *subview in [searchBar subviews]) {
    if ([subview isKindOfClass:NSClassFromString(@"UISearchBarBackground")])
    {
        [subview removeFromSuperview];
    }
}

for (UIView *subview in [searchBar subviews]) {
        NSLog(@"%@", [subview class]);
}

Customizing the search bar textfield in iPhone

http://caydenliew.com/2012/01/customize-uisearchbar-background-image/
for (UIView *subview in [searchBar subviews]) {
        if ([subview isKindOfClass:NSClassFromString(@"UISearchBarBackground")])
        {
            [d

        if ([subview isKindOfClass:NSClassFromString(@"UISearchBarTextField")]) {
            [(UITextField *)subview setBackground:[UIImage imageNamed:@"searchboxbg.png"]];
        }
    }

Checking device compatibilty comparision parameter in iphone

iPhone 1G
iPhone 3G
iPhone 3GS
iPhone 4
Verizon iPhone 4
iPhone 4S
iPad
iPad 2 (GSM)
iPad 2 (CDMA)
iPad-3G (4G)

Image color operation in iphone

https://github.com/tomsoft1/StackBluriOS
CIImage

Collection view in iOS 6 with Xcode 4.5 in iPhone

https://github.com/RomanN2/CollectionView

Starting to ending for the registering and issuing the certificate for the IOS program.

http://www.raywenderlich.com/8003/how-to-submit-your-app-to-apple-from-no-account-to-app-store-part-1

Not reloaded issue with the CellforTowAtIndexPath + tableview + iphone

http://blog.d-17.com/2009/10/combining-multiple-uitextfields-and-a-uitableview-in-a-nice-way-for-an-iphone-app-part-2/

https://github.com/breeno/EditingUITableView

Write down this statement to the cellforrowatindexPath method of tableview and it will work now.
NSString *CellIdentifier = [NSString stringWithFormat: @"Cell%i", indexPath.row];


Example......
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
   
    NSString *CellIdentifier = [NSString stringWithFormat: @"Cell%i", indexPath.row];
   
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] ;
        UITextField *textField = [[UITextField alloc]initWithFrame:CGRectMake(140.0, 12.0,170.0, 25.0)];
        textField.borderStyle = UITextBorderStyleNone;
        //yes strange, but otherwise the textfield won't show up :(
        cell.textLabel.backgroundColor = [UIColor blackColor];
        textField.tag=indexPath.row;
        //textField.text = [NSString stringWithFormat:@"value %i", indexPath.row];
        textField.placeholder= [NSString stringWithFormat:@"value %i", indexPath.row];
        [textField setDelegate:self];       
        //[textField addTarget:self                       action:@selector(textFieldDone:)
        //    forControlEvents:UIControlEventEditingDidEndOnExit];
        [cell.contentView addSubview:textField];
        [textField release];
        cell.textLabel.text = [NSString stringWithFormat:@"Item %i", indexPath.row];//[questionsArray objectAtIndex:indexPath.row];
        textField.returnKeyType=UIReturnKeyNext;
        if (indexPath.row==6) {
            textField.returnKeyType=UIReturnKeyDone;
        }
    }   
    cell.selectionStyle=UITableViewCellSelectionStyleNone;
    return cell;// autorelease];
}
 

Directly open up the map from the running app in iPhone

NSString* address = @"118 Your Address., City, State, ZIPCODE";
NSString* currentLocation = @"Current Location";
NSString* url = [NSString stringWithFormat: @"http://maps.google.com/maps?saddr=%@&daddr=%@",[currentLocation stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],[address stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
   UIApplication *app = [UIApplication sharedApplication];
[app openURL: [NSURL URLWithString: url]];

Friday, 27 April 2012

urldemo 11

//For the resuming the app after call ended in iPhone
NSString *strPhoneNo = @"9904523387";
    UIWebView *phoneCallWebview = [[UIWebView alloc] init];
    NSURL *callURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", strPhoneNo]];
    [phoneCallWebview loadRequest:[NSURLRequest requestWithURL:callURL ]];


//For the different kind of animation in iPhone
https://github.com/bobmccune/Core-Animation-Demos

//For the rotating the like a wheel control in iPhone
https://github.com/funkyboy/How-To-Create-a-Rotating-Wheel-Control-with-UIKit

//For the different kind of demo for iPhone
http://highwaystech.com/index.php/source-code/ios.html

//For the poptextview demo in iPhone
https://github.com/inamiy/YIPopupTextView

//For the best coverflow example for iPhone
https://github.com/nicklockwood/icarousel

//For the tag cloud for the iPhone
https://github.com/cezarsignori/SphereView/

//For the barcode api for iPhone
http://www.mashape.com/index
maulik
iball@1910
http://www.upcdatabase.com/item/0016000660601

//For the searching in search bar or array in iPhone
 NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(SELF BEGINSWITH [cd] %@)", savedSearchTerm];
        [searchResults addObjectsFromArray: [states filteredArrayUsingPredicate:predicate]];
   


//For the loading more no of row in tableview in iPhone
http://useyourloaf.com/blog/2010/10/2/dynamically-loading-new-rows-into-a-table.html

//For the different example of iPhone
http://kshitizghimire.com.np/lazy-loading-custom-uitableviewcell/

//For the all kind of demo for the Mono touch application for iPhone
http://samples.xamarin.com/Samples

//For the pop view like the crossdissolve in iphone
https://github.com/jerometonnelier/LeveyPopListView
- (void)fadeIn
{
    self.transform = CGAffineTransformMakeScale(1.3, 1.3);
    self.alpha = 0;
    [UIView animateWithDuration:.35 animations:^{
        self.alpha = 1;
        self.transform = CGAffineTransformMakeScale(1, 1);
    }];

}
- (void)fadeOut
{
    [UIView animateWithDuration:.35 animations:^{
        self.transform = CGAffineTransformMakeScale(1.3, 1.3);
        self.alpha = 0.0;
    } completion:^(BOOL finished) {
        if (finished) {
            [self removeFromSuperview];
        }
    }];
}
//For the face detection by third party in iPhone
http://developers.face.com/download/
https://github.com/sergiomtzlosa/faceWrapper-iphone

//For the setting the color to the tab bar in iPhone
 // customize the tab bar background
    CGRect frame = CGRectMake(0, 0, 320, 49);
    UIView *viewBackround = [[UIView alloc] initWithFrame:frame];
    UIImage *imgBackground = [UIImage imageNamed:@"tabBg.png"];
    UIColor *colorPattern = [[UIColor alloc] initWithPatternImage:imgBackground];
    viewBackround.backgroundColor = colorPattern;
    [colorPattern release];
    [[self.tabBarController tabBar] insertSubview:viewBackround atIndex:1];
    [viewBackround release];