Advertisement
Avatarr

data

Oct 8th, 2014
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -(void)createRewardScrollView
  2. {
  3.     double height = 50.0;
  4.     double width = 155.5;
  5.     double space = 4.0;
  6.    
  7.     if (self.m_arr_reward && [self.m_arr_reward count] > 0)
  8.     {
  9.        
  10.         self.rewardScrollView.contentSize = CGSizeMake([self.m_arr_reward count] * (width + space), height);
  11.         self.rewardScrollView.backgroundColor = [UIColor clearColor];
  12.        
  13.        
  14.         for (int i = 0; i < [self.m_arr_reward count]; i++)
  15.         {
  16.             NSDictionary * data = [self.m_arr_reward objectAtIndex:i];
  17.  
  18.             NSString *urlStrRight = [data objectForKey:@"image_thumbnail"];
  19.             NSURL *urlImageRight = [NSURL URLWithString:urlStrRight];
  20.            self.imageReward = [[[AsyncImageView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)] autorelease];
  21.             if (urlImageRight)
  22.             {
  23.                 self.imageReward.imageURL = urlImageRight;
  24.             }
  25.             else
  26.             {
  27.                 self.imageReward.image = nil;
  28.             }
  29.             self.point.text = [data objectForKey:@"point"];
  30.            
  31.            [self.rewardScrollView addSubview:self.rewardView];
  32.  
  33.         }
  34.        
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement