Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0"))
- {
- weeklyAudio=[UIButton buttonWithType:UIButtonTypeCustom];
- [weeklyAudio addTarget:self action:@selector(weeklyPredictions) forControlEvents:UIControlEventTouchUpInside];
- [weeklyAudio setTitle:@"WEEKLY PREDICTIONS" forState:UIControlStateNormal];
- weeklyAudio.titleLabel.textAlignment = NSLineBreakByWordWrapping;
- weeklyAudio.titleLabel.numberOfLines = 2;
- [weeklyAudio.titleLabel setTextAlignment: NSTextAlignmentCenter];
- [weeklyAudio setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
- [weeklyAudio.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
- weeklyAudio.frame=CGRectMake(10, 100, 140, 120);
- weeklyAudio.layer.cornerRadius=5;
- weeklyAudio.backgroundColor=[UIColor colorWithRed:232.0f/255.0f green:52.0f/255.0f blue:27.0f/255.0f alpha:1.0];
- [self.view addSubview:weeklyAudio];
- weeklyAudioImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
- weeklyAudioImage.image=[UIImage imageNamed:@"48*48.png"];
- [weeklyAudio addSubview:weeklyAudioImage];
- weeklyAudio.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin;
- // Create Yearly Predictions Button.
- yearlyAudio=[UIButton buttonWithType:UIButtonTypeCustom];
- [yearlyAudio addTarget:self action:@selector(yearlyPredictions) forControlEvents:UIControlEventTouchUpInside];
- [yearlyAudio setTitle:@"YEARLY PREDICTIONS" forState:UIControlStateNormal];
- yearlyAudio.titleLabel.textAlignment=NSLineBreakByWordWrapping;
- yearlyAudio.titleLabel.numberOfLines=2;
- [yearlyAudio.titleLabel setTextAlignment:NSTextAlignmentCenter];
- [yearlyAudio setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
- [yearlyAudio.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
- yearlyAudio.frame=CGRectMake(160, 100, 140, 120);
- yearlyAudio.layer.cornerRadius=5;
- yearlyAudio.backgroundColor=[UIColor colorWithRed:16.0f/255.0f green:144.0f/255.0f blue:209.0f/255.0f alpha:1.0];
- [self.view addSubview:yearlyAudio];
- yearlyAudioImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
- yearlyAudioImage.image=[UIImage imageNamed:@"48*48.png"];
- [yearlyAudio addSubview:yearlyAudioImage];
- yearlyAudio.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin;
- panchamgamButton=[UIButton buttonWithType:UIButtonTypeCustom];
- [panchamgamButton addTarget:self action:@selector(panchangam) forControlEvents:UIControlEventTouchUpInside];
- [panchamgamButton setTitle:@"PANCHANGAM PATANAM" forState:UIControlStateNormal];
- panchamgamButton.titleLabel.textAlignment = NSLineBreakByWordWrapping;
- panchamgamButton.titleLabel.numberOfLines = 2;
- [panchamgamButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
- [panchamgamButton setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
- [panchamgamButton.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
- panchamgamButton.frame=CGRectMake(10, 240, 140, 120);
- panchamgamButton.layer.cornerRadius=5;
- panchamgamButton.backgroundColor=[UIColor colorWithRed:255.0f/255.0f green:184.0f/255.0f blue:2.0f/255.0f alpha:1.0];
- [self.view addSubview:panchamgamButton];
- panchamgamImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
- panchamgamImage.image=[UIImage imageNamed:@"48*48.png"];
- [panchamgamButton addSubview:panchamgamImage];
- panchamgamButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin;
- // calendar creation
- calendarButton=[UIButton buttonWithType:UIButtonTypeCustom];
- [calendarButton addTarget:self action:@selector(calender) forControlEvents:UIControlEventTouchUpInside];
- [calendarButton setTitle:@"CALENDAR" forState:UIControlStateNormal];
- [calendarButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
- [calendarButton setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
- [calendarButton.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
- calendarButton.frame=CGRectMake(160, 240, 140, 120);
- calendarButton.layer.cornerRadius=5;
- calendarButton.backgroundColor=[UIColor colorWithRed:239.0f/255.0f green:49.0f/255.0f blue:87.0f/255.0f alpha:1.0];
- [self.view addSubview:calendarButton];
- calendarImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
- calendarImage.image=[UIImage imageNamed:@"calendaricon48*48.png"];
- [calendarButton addSubview:calendarImage];
- calendarImage.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin;
- // proven Predicitons Button Creation
- provenPredictButton=[UIButton buttonWithType:UIButtonTypeCustom];
- [provenPredictButton addTarget:self action:@selector(provenPredict) forControlEvents:UIControlEventTouchUpInside];
- [provenPredictButton setTitle:@"PROVEN PREDICTIONS" forState:UIControlStateNormal];
- provenPredictButton.titleLabel.textAlignment = NSLineBreakByWordWrapping;
- provenPredictButton.titleLabel.numberOfLines = 2;
- [provenPredictButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
- [provenPredictButton setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
- [provenPredictButton.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
- provenPredictButton.frame=CGRectMake(10, 380, 140, 120);
- provenPredictButton.layer.cornerRadius=5;
- provenPredictButton.backgroundColor=[UIColor colorWithRed:246.0f/255.0f green:83.0f/255.0f blue:50.0f/255.0f alpha:1.0];
- [self.view addSubview:provenPredictButton];
- provenPredictImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
- provenPredictImage.image=[UIImage imageNamed:@"48*48.png"];
- [provenPredictButton addSubview:provenPredictImage];
- provenPredictButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin;
- // Future Predictions
- futurePredictionsButton=[UIButton buttonWithType:UIButtonTypeCustom];
- [futurePredictionsButton addTarget:self action:@selector(futurePredictions) forControlEvents:UIControlEventTouchUpInside];
- [futurePredictionsButton setTitle:@"FUTURE PREDICTIONS" forState:UIControlStateNormal];
- futurePredictionsButton.titleLabel.textAlignment = NSLineBreakByWordWrapping;
- futurePredictionsButton.titleLabel.numberOfLines = 2;
- [futurePredictionsButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
- [futurePredictionsButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
- [futurePredictionsButton setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
- [futurePredictionsButton.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
- futurePredictionsButton.frame=CGRectMake(160, 380, 140, 120);
- futurePredictionsButton.layer.cornerRadius=5;
- futurePredictionsButton.backgroundColor=[UIColor colorWithRed:114.0f/255.0f green:188.0f/255.0f blue:7.0f/255.0f alpha:1.0];
- [self.view addSubview:futurePredictionsButton];
- futurePredictionsImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
- futurePredictionsImage.image=[UIImage imageNamed:@"futureicon48.png"];
- [futurePredictionsButton addSubview:futurePredictionsImage];
- futurePredictionsImage.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin;
- ADBannerView *adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
- // adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierPortrait;
- adView.frame=CGRectMake(0, 510, 320, 40);
- adView.delegate=self;
- // adView.backgroundColor=[UIColor brownColor];
- [self.view addSubview:adView];
- adView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin;
- }
- else
- {
- weeklyAudio=[UIButton buttonWithType:UIButtonTypeCustom];
- [weeklyAudio addTarget:self action:@selector(weeklyPredictions) forControlEvents:UIControlEventTouchUpInside];
- [weeklyAudio setTitle:@"WEEKLY PREDICTIONS" forState:UIControlStateNormal];
- weeklyAudio.titleLabel.textAlignment = NSLineBreakByWordWrapping;
- weeklyAudio.titleLabel.numberOfLines = 2;
- [weeklyAudio.titleLabel setTextAlignment: NSTextAlignmentCenter];
- [weeklyAudio setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
- [weeklyAudio.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
- weeklyAudio.frame=CGRectMake(10, 60, 140, 120);
- weeklyAudio.layer.cornerRadius=5;
- weeklyAudio.backgroundColor=[UIColor colorWithRed:232.0f/255.0f green:52.0f/255.0f blue:27.0f/255.0f alpha:1.0];
- [self.view addSubview:weeklyAudio];
- weeklyAudioImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
- weeklyAudioImage.image=[UIImage imageNamed:@"48*48.png"];
- [weeklyAudio addSubview:weeklyAudioImage];
- weeklyAudio.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin;
- // Create Yearly Prediction Button Audio
- yearlyAudio=[UIButton buttonWithType:UIButtonTypeCustom];
- [yearlyAudio addTarget:self action:@selector(yearlyPredictions) forControlEvents:UIControlEventTouchUpInside];
- [yearlyAudio setTitle:@"YEARLY PREDICTIONS" forState:UIControlStateNormal];
- yearlyAudio.titleLabel.textAlignment = NSLineBreakByWordWrapping;
- yearlyAudio.titleLabel.numberOfLines = 2;
- [yearlyAudio.titleLabel setTextAlignment: NSTextAlignmentCenter];
- [yearlyAudio setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
- [yearlyAudio.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
- yearlyAudio.frame=CGRectMake(160, 60, 140, 120);
- yearlyAudio.layer.cornerRadius=5;
- yearlyAudio.backgroundColor=[UIColor colorWithRed:16.0f/255.0f green:144.0f/255.0f blue:209.0f/255.0f alpha:1.0];
- [self.view addSubview:yearlyAudio];
- yearlyAudioImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
- yearlyAudioImage.image=[UIImage imageNamed:@"48*48.png"];
- [yearlyAudio addSubview:yearlyAudioImage];
- yearlyAudio.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin;
- // create Panchamgam patanam
- panchamgamButton=[UIButton buttonWithType:UIButtonTypeCustom];
- [panchamgamButton addTarget:self action:@selector(panchangam) forControlEvents:UIControlEventTouchUpInside];
- [panchamgamButton setTitle:@"PANCHANGAM PATANAM" forState:UIControlStateNormal];
- panchamgamButton.titleLabel.textAlignment = NSLineBreakByWordWrapping;
- panchamgamButton.titleLabel.numberOfLines = 2;
- [panchamgamButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
- [panchamgamButton setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
- [panchamgamButton.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
- panchamgamButton.frame=CGRectMake(10, 190, 140, 120);
- panchamgamButton.layer.cornerRadius=5;
- panchamgamButton.backgroundColor=[UIColor colorWithRed:255.0f/255.0f green:184.0f/255.0f blue:2.0f/255.0f alpha:1.0];
- [self.view addSubview:panchamgamButton];
- panchamgamImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
- panchamgamImage.image=[UIImage imageNamed:@"48*48.png"];
- [panchamgamButton addSubview:panchamgamImage];
- panchamgamButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin;
- // calendar creation
- calendarButton=[UIButton buttonWithType:UIButtonTypeCustom];
- [calendarButton addTarget:self action:@selector(calender) forControlEvents:UIControlEventTouchUpInside];
- [calendarButton setTitle:@"CALENDAR" forState:UIControlStateNormal];
- [calendarButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
- [calendarButton setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
- [calendarButton.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
- calendarButton.frame=CGRectMake(160, 190, 140, 120);
- calendarButton.layer.cornerRadius=5;
- calendarButton.backgroundColor=[UIColor colorWithRed:239.0f/255.0f green:49.0f/255.0f blue:87.0f/255.0f alpha:1.0];
- [self.view addSubview:calendarButton];
- calendarImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
- calendarImage.image=[UIImage imageNamed:@"calendaricon48*48.png"];
- [calendarButton addSubview:calendarImage];
- calendarImage.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin;
- // Proven Predict Image
- // create Panchamgam patanam
- provenPredictButton=[UIButton buttonWithType:UIButtonTypeCustom];
- [provenPredictButton addTarget:self action:@selector(provenPredict) forControlEvents:UIControlEventTouchUpInside];
- [provenPredictButton setTitle:@"PROVEN PREDICTIONS" forState:UIControlStateNormal];
- provenPredictButton.titleLabel.textAlignment = NSLineBreakByWordWrapping;
- provenPredictButton.titleLabel.numberOfLines = 2;
- [provenPredictButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
- [provenPredictButton setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
- [provenPredictButton.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
- provenPredictButton.frame=CGRectMake(10, 320, 140, 120);
- provenPredictButton.layer.cornerRadius=5;
- provenPredictButton.backgroundColor=[UIColor colorWithRed:246.0f/255.0f green:83.0f/255.0f blue:50.0f/255.0f alpha:1.0];
- [self.view addSubview:provenPredictButton];
- provenPredictImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
- provenPredictImage.image=[UIImage imageNamed:@"48*48.png"];
- [provenPredictButton addSubview:provenPredictImage];
- provenPredictButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin;
- // Future Predictions
- futurePredictionsButton=[UIButton buttonWithType:UIButtonTypeCustom];
- [futurePredictionsButton addTarget:self action:@selector(futurePredictions) forControlEvents:UIControlEventTouchUpInside];
- [futurePredictionsButton setTitle:@"FUTURE PREDICTIONS" forState:UIControlStateNormal];
- futurePredictionsButton.titleLabel.textAlignment = NSLineBreakByWordWrapping;
- futurePredictionsButton.titleLabel.numberOfLines = 2;
- [futurePredictionsButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
- [futurePredictionsButton.titleLabel setTextAlignment: NSTextAlignmentCenter];
- [futurePredictionsButton setTitleEdgeInsets:UIEdgeInsetsMake(60, 10, 10, 10)];
- [futurePredictionsButton.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
- futurePredictionsButton.frame=CGRectMake(160, 320, 140, 120);
- futurePredictionsButton.layer.cornerRadius=5;
- futurePredictionsButton.backgroundColor=[UIColor colorWithRed:114.0f/255.0f green:188.0f/255.0f blue:7.0f/255.0f alpha:1.0];
- [self.view addSubview:futurePredictionsButton];
- futurePredictionsImage=[[UIImageView alloc]initWithFrame:CGRectMake(45, 10, 48, 48)];
- futurePredictionsImage.image=[UIImage imageNamed:@"futureicon48.png"];
- [futurePredictionsButton addSubview:futurePredictionsImage];
- futurePredictionsImage.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin;
- ADBannerView *adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
- // adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierPortrait;
- adView.frame=CGRectMake(0, 400, 320, 40);
- adView.delegate=self;
- // adView.backgroundColor=[UIColor brownColor];
- [self.view addSubview:adView];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement