Search Results

Search found 2 results on 1 pages for 'nandakishore'.

Page 1/1 | 1 

  • iPhone: how to keep integer value on UILabel

    - by Nandakishore
    i am working on Twitter on iPhone now i have to keep the count of Friend, Tweets, Followers etc on UILabel how to work with this (void)userInfoReceived:(NSArray *)userInfo forRequest:(NSString *)connectionIdentifier { NSLog(@"User Info Received: %@", userInfo); // userInfo contains all user details like userName, screenName, count of Friends, Followers, Following, Status Count etc NSLog(@"User Info Received: %d", [userInfo count]); NSMutableDictionary *profileData = [userInfo objectAtIndex:0]; //converting userInfo array into profileData dictionary lblUserName.text = [profileData objectForKey:@"name"]; // lblUserName is UILabel, userName keeping on Label lblLocation.text = [profileData objectForKey:@"location"]; // lblLocation is UILabel, Location keeping on Label lblDescription.text = [profileData objectForKey:@"description"]; // lblDescription is UILabel, Location keeping on Label /////* Up to here all working but how to Keep integer value on UILabel *///// lblFolCount = (NSNumber *)[profileData objectForKey:@"followers_count"]; //how to keep user Followers Count on UILable lblFavCount = (NSNumber *)[profileData objectForKey:@"favourites_count"]; //how to keep user Followers Count on UILable lblStatusCount = (NSNumber *) [profileData objectForKey:@"statuses_count"]; //how to keep user statuses count on UILable lblFriends = (NSNumber *) [profileData objectForKey:@"friends_count"]; //how to keep user friends count on UILable } ////**This info Display on debugger console*/////// ////NSLog(@"User Info Received: %@", userInfo); // by this we get info on debugger console User Info Received: ( { "created_at" = "Tue Nov 02 14:42:42 +0000 2010"; description = "being honest"; favorited = false; "favourites_count" = 0; "followers_count" = 5; "friends_count" = 21; "listed_count" = 0; location = Chennai; name = "nanda kishore reddyv"; "profile_background_color" = EDECE9; "profile_background_image_url" = "http://a2.twimg.com/a/1292975674/images/themes/theme3/bg.gif"; "profile_background_tile" = false; "profile_image_url" = "http://a2.twimg.com/a/1292975674/images/default_profile_6_normal.png"; "retweet_count" = 0; "screen_name" = velugotinanda; source = "<a href=\"http://www.icodeblog.com\" rel=\"nofollow\">iCodeBlog Oauth Demo</a>"; status = "Mon Dec 27 09:22:44 +0000 2010"; "statuses_count" = 15; "time_zone" = "Indiana (East)"; verified = false; } ) 2011-01-01 10:38:29.460 IdeaTweet[471:207] User Info Received: 1 Thanks YOU can you tell me how to Keep integer Value on UILabel

    Read the article

  • iPhone: custom cell is overlaping with each other

    - by Nandakishore
    hi i am working on Table view, my Table view first custom cell is over ride other cell when Scrolling this is my code import UIKit/UIKit.h @interface MyTweetViewController : UIViewController { IBOutlet UITableView *tweetsTableView; NSMutableArray *tweetArray; } @property (nonatomic, retain) IBOutlet UITableView *tweetsTableView; @end import "MyTweetViewController.h" @implementation MyTweetViewController @synthesize tweetsTableView; (void)viewDidLoad { tweetArray = [[NSMutableArray alloc] init]; [tweetsTableView setBackgroundColor:[UIColor clearColor]]; [super viewDidLoad]; } pragma mark - pragma mark Table view data source (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // Return the number of sections. return 1; } (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in the section. return [tweetArray count]; } (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 80; } - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { [cell setBackgroundColor:[UIColor clearColor]]; } //Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *identifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; if(!cell) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewStyleGrouped reuseIdentifier:identifier]; cell.selectionStyle = UITableViewCellSelectionStyleNone; } cell.accessoryType = UITableViewCellAccessoryNone; UILabel * name = [[UILabel alloc]initWithFrame:CGRectMake(72,3,242,15)]; name.text = (NSString*)[(Tweet*)[tweetArray objectAtIndex:indexPath.row] userName]; [name setFont:[UIFont fontWithName:@"Helvetica" size:14]]; name.textColor=[UIColor colorWithRed:250 green:250 blue:210 alpha:0.5]; [name setBackgroundColor:[UIColor clearColor]]; UILabel * tweetLabel = [[UILabel alloc]initWithFrame:CGRectMake(72,20,242,60)]; tweetLabel.text = (NSString*)[(Tweet*)[tweetArray objectAtIndex:indexPath.row] tweet]; tweetLabel.numberOfLines = 3; tweetLabel.textColor=[UIColor colorWithRed:252 green:148 blue:31 alpha:1]; [tweetLabel setFont:[UIFont fontWithName:@"Helvetica" size:12]]; [tweetLabel setBackgroundColor:[UIColor clearColor]]; NSLog(@" lblUserTweet : %@ ",name.text); UIImageView *myImage = [[UIImageView alloc]initWithFrame:CGRectMake(6,3,58,49)]; NSURL url = [NSURL URLWithString:[(Tweet)[tweetArray objectAtIndex:indexPath.row] image_url]]; NSData *data = [NSData dataWithContentsOfURL:url]; [myImage setImage: [UIImage imageWithData:data]]; [cell.contentView addSubview:myImage]; [cell.contentView addSubview:tweetLabel]; [cell.contentView addSubview:name]; return cell; } (void)dealloc { [tweetsTableView release]; [tweetArray release]; [super dealloc]; }

    Read the article

1