Skip to content

Instantly share code, notes, and snippets.

@charleshkang
Created July 24, 2015 17:03
Show Gist options
  • Save charleshkang/7b3511875b448bc84cd9 to your computer and use it in GitHub Desktop.
Save charleshkang/7b3511875b448bc84cd9 to your computer and use it in GitHub Desktop.
//
// ViewController.m
// TwitterUI
//
// Created by Michael Kavouras on 7/19/15.
// Copyright (c) 2015 Mike Kavouras. All rights reserved.
//
#import "ViewController.h"
#import <QuartzCore/QuartzCore.h>
@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *charlesProfilePic;
@property (weak, nonatomic) IBOutlet UIView *followRounded;
@property (weak, nonatomic) IBOutlet UIView *messagesRounded;
@property (weak, nonatomic) IBOutlet UISegmentedControl *segmentedControl;
@property (weak, nonatomic) IBOutlet UILabel *tweetsNotLoading;
@end
@implementation ViewController
@synthesize segmentedControl;
- (IBAction)segmentedControlAction:(id)sender {
if(segmentedControl.selectedSegmentIndex == 0)
{
NSLog(@"Tweets aren't loading right now");
// self.tweetsNotLoading.text = [self tweets];
}
else
if(segmentedControl.selectedSegmentIndex == 1)
{
NSLog(@"Media isn't loading right now");
// self.tweetsNotLoading.text = [self media];
}
else
if(segmentedControl.selectedSegmentIndex == 2)
{
NSLog(@"Favorites aren't loading right now");
// self.tweetsNotLoading.text = [self favorites];
}
}
- (void)viewDidLoad {
[super viewDidLoad];
self.charlesProfilePic.layer.cornerRadius = 8.0;
self.charlesProfilePic.layer.masksToBounds = YES;
self.charlesProfilePic.layer.borderWidth = 3.0f;
self.charlesProfilePic.layer.borderColor = [UIColor whiteColor].CGColor;
self.followRounded.layer.cornerRadius = 6.0;
self.followRounded.layer.masksToBounds = YES;
self.followRounded.layer.borderWidth = 2.0f;
self.followRounded.layer.borderColor = [UIColor colorWithRed:85/255.0 green:172/255.0 blue:238/255.0 alpha: 1].CGColor;
self.messagesRounded.layer.cornerRadius = 6.0;
self.messagesRounded.layer.masksToBounds = YES;
self.messagesRounded.layer.borderWidth =2.0f;
self.messagesRounded.layer.borderColor = [UIColor colorWithRed:85/255.0 green:172/255.0 blue:238/255.0 alpha: 1].CGColor;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment