Advertisement
ramu7

some changes

Apr 15th, 2014
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -(void)viewDidLoad
  2.  
  3. {
  4.   if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0"))
  5.          
  6.      {
  7.          [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleDefault];
  8.  
  9.       // proven Predicitons Button Creation
  10.          
  11.          provenPredictButton=[UIButton buttonWithType:UIButtonTypeCustom];
  12.          
  13.          [provenPredictButton addTarget:self action:@selector(provenPredict) forControlEvents:UIControlEventTouchUpInside];
  14.          
  15.          
  16.          [provenPredictButton setTitle:@"PROVEN PREDICTIONS" forState:UIControlStateNormal];
  17.          
  18.          provenPredictButton.titleLabel.textAlignment = NSLineBreakByWordWrapping;
  19.          
  20.          provenPredictButton.titleLabel.numberOfLines = 2;
  21.          
  22.          [provenPredictButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
  23.          
  24.          
  25.          [provenPredictButton setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
  26.          
  27.          [provenPredictButton.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
  28.          
  29.          provenPredictButton.frame=CGRectMake(10, 380, 140, 120);
  30.          
  31.          provenPredictButton.layer.cornerRadius=5;
  32.          
  33.          provenPredictButton.backgroundColor=[UIColor colorWithRed:246.0f/255.0f green:83.0f/255.0f blue:50.0f/255.0f alpha:1.0];
  34.          
  35.          [self.view addSubview:provenPredictButton];
  36.          
  37.          provenPredictImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
  38.          
  39.          provenPredictImage.image=[UIImage imageNamed:@"48*48.png"];
  40.          
  41.          [provenPredictButton addSubview:provenPredictImage];
  42.          
  43.          
  44.      
  45.          
  46.          provenPredictButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin  | UIViewAutoresizingFlexibleTopMargin;
  47.          
  48.          
  49.          
  50.          // Future Predictions
  51.          
  52.          
  53.          
  54.          futurePredictionsButton=[UIButton buttonWithType:UIButtonTypeCustom];
  55.          
  56.          [futurePredictionsButton addTarget:self action:@selector(futurePredictions) forControlEvents:UIControlEventTouchUpInside];
  57.          
  58.          [futurePredictionsButton setTitle:@"FUTURE PREDICTIONS" forState:UIControlStateNormal];
  59.          
  60.          futurePredictionsButton.titleLabel.textAlignment = NSLineBreakByWordWrapping;
  61.          
  62.          futurePredictionsButton.titleLabel.numberOfLines = 2;
  63.          
  64.          [futurePredictionsButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
  65.          
  66.          
  67.          
  68.          [futurePredictionsButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
  69.          
  70.          [futurePredictionsButton setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
  71.          
  72.          [futurePredictionsButton.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
  73.          
  74.          futurePredictionsButton.frame=CGRectMake(160, 380, 140, 120);
  75.          
  76.          futurePredictionsButton.layer.cornerRadius=5;
  77.          
  78.          futurePredictionsButton.backgroundColor=[UIColor colorWithRed:114.0f/255.0f green:188.0f/255.0f blue:7.0f/255.0f alpha:1.0];
  79.          
  80.          [self.view addSubview:futurePredictionsButton];
  81.          
  82.          futurePredictionsImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
  83.          
  84.          futurePredictionsImage.image=[UIImage imageNamed:@"futureicon48.png"];
  85.          
  86.          [futurePredictionsButton addSubview:futurePredictionsImage];
  87.          
  88.    
  89.          
  90.          futurePredictionsImage.autoresizingMask =  UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin  | UIViewAutoresizingFlexibleTopMargin;
  91.          
  92.          
  93.        
  94.          
  95.          ADBannerView *adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
  96.          //    adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierPortrait;
  97.          adView.frame=CGRectMake(0, 580, 320, 40);
  98.          adView.delegate=self;
  99.          //    adView.backgroundColor=[UIColor brownColor];
  100.        
  101.          
  102.          
  103.          adView.autoresizingMask =  UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin  | UIViewAutoresizingFlexibleTopMargin;
  104.  
  105.  
  106.          
  107.     }
  108.    
  109.     else
  110.     {  
  111.        
  112.         // create Panchamgam patanam
  113.        
  114.         provenPredictButton=[UIButton buttonWithType:UIButtonTypeCustom];
  115.        
  116.         [provenPredictButton addTarget:self action:@selector(provenPredict) forControlEvents:UIControlEventTouchUpInside];
  117.        
  118.        
  119.         [provenPredictButton setTitle:@"PROVEN PREDICTIONS" forState:UIControlStateNormal];
  120.        
  121.         provenPredictButton.titleLabel.textAlignment = NSLineBreakByWordWrapping;
  122.        
  123.         provenPredictButton.titleLabel.numberOfLines = 2;
  124.        
  125.         [provenPredictButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
  126.        
  127.        
  128.         [provenPredictButton setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
  129.        
  130.         [provenPredictButton.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
  131.        
  132.         provenPredictButton.frame=CGRectMake(10, 290, 140, 110);
  133.        
  134.         provenPredictButton.layer.cornerRadius=5;
  135.        
  136.         provenPredictButton.backgroundColor=[UIColor colorWithRed:246.0f/255.0f green:83.0f/255.0f blue:50.0f/255.0f alpha:1.0];
  137.        
  138.        
  139.        
  140.        
  141.         [self.view addSubview:provenPredictButton];
  142.        
  143.        
  144.        
  145.         provenPredictImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
  146.        
  147.         provenPredictImage.image=[UIImage imageNamed:@"48*48.png"];
  148.        
  149.        
  150.         [provenPredictButton addSubview:provenPredictImage];
  151.        
  152.        
  153.         provenPredictButton.autoresizingMask =  UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin  | UIViewAutoresizingFlexibleTopMargin;
  154.        
  155.        
  156.        
  157.         // Future Predictions
  158.        
  159.        
  160.        
  161.         futurePredictionsButton=[UIButton buttonWithType:UIButtonTypeCustom];
  162.        
  163.         [futurePredictionsButton addTarget:self action:@selector(futurePredictions) forControlEvents:UIControlEventTouchUpInside];
  164.        
  165.         [futurePredictionsButton setTitle:@"FUTURE PREDICTIONS" forState:UIControlStateNormal];
  166.        
  167.         futurePredictionsButton.titleLabel.textAlignment = NSLineBreakByWordWrapping;
  168.        
  169.         futurePredictionsButton.titleLabel.numberOfLines = 2;
  170.        
  171.         [futurePredictionsButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
  172.        
  173.        
  174.        
  175.         [futurePredictionsButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
  176.        
  177.         [futurePredictionsButton setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
  178.        
  179.         [futurePredictionsButton.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
  180.        
  181.         futurePredictionsButton.frame=CGRectMake(160, 290, 140, 110);
  182.        
  183.         futurePredictionsButton.layer.cornerRadius=5;
  184.        
  185.         futurePredictionsButton.backgroundColor=[UIColor colorWithRed:114.0f/255.0f green:188.0f/255.0f blue:7.0f/255.0f alpha:1.0];
  186.        
  187.         [self.view addSubview:futurePredictionsButton];
  188.        
  189.         futurePredictionsImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
  190.        
  191.         futurePredictionsImage.image=[UIImage imageNamed:@"futureicon48.png"];
  192.        
  193.         [futurePredictionsButton addSubview:futurePredictionsImage];
  194.        
  195.         futurePredictionsImage.autoresizingMask =  UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin  | UIViewAutoresizingFlexibleTopMargin;
  196.        
  197.        
  198.         ADBannerView *adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
  199.    
  200.         adView.frame=CGRectMake(0, 410, 320, 40);
  201.        
  202.         adView.delegate=self;
  203.      
  204.         [self.view addSubview:adView];
  205.        
  206.        
  207.         adView.autoresizingMask =  UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin  | UIViewAutoresizingFlexibleTopMargin;
  208.  
  209.  
  210.     }
  211.    
  212.    
  213. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement