This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//allocate the view that contains the popup | |
popUpView = [[UIView alloc] initWithFrame:CGRectMake(POPUP_X, POPUP_Y, POPUP_WIDTH, POPUP_HEIGHT)]; | |
popUpView.backgroundColor = [UIColor whiteColor]; | |
[self.view addSubview:popUpView]; | |
UIButton *clickHere = [UIButton buttonWithType:UIButtonTypeCustom]; | |
clickHere.frame = popUpView.frame; | |
clickHere.backgroundColor = [UIColor redColor]; | |
[popUpView addSubview:clickHere]; | |
[clickHere setTitle:@"Click Here" forState:UIControlStateNormal]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"scroller.png"]]; | |
imageView.frame = CGRectMake(0, 375, kScrollObjWidth, kScrollObjHeight); | |
[scroller addSubview:imageView]; | |
[scroller setScrollEnabled:YES]; | |
[scroller setContentSize:CGSizeMake(kScrollObjWidth, kScrollObjHeight)]; | |
[scroller addSubview:imageView]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma mark - keyboard delegates | |
-(void) textFieldDidBeginEditing:(UITextField *)textFieldView | |
{ | |
currentTextField = textFieldView; | |
} | |
- (BOOL)textFieldShouldReturn:(UITextField *)textField | |
{ | |
if(textField == titleOfImageTextField) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) getJSON { | |
// Create the request. | |
NSURLRequest *urlRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.zeroeightysix.com/Logovision/jsonhotspotting.json"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; | |
//Create queue | |
NSOperationQueue *queue = [[NSOperationQueue alloc] init]; | |
// JSON as a NSData object | |
[NSURLConnection sendAsynchronousRequest:urlRequest queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface ViewController : UIViewController { | |
} | |
//Add the IBAction to the button to switch views | |
-(IBAction)goToViewTwo:(id)sender; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Other class.h | |
//Include the needed method's class's .h | |
#import "AppDelegate.h" | |
@interface aWebView : UIViewController { | |
//Create the delegate | |
AppDelegate *appDelegate; | |
} | |
//OtherClass.m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation ProjectsViewController | |
@synthesize imageView, swipeUpGR, theProjects, tapGR, arrayOfImages; | |
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | |
{ | |
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | |
if (self) | |
{ | |
// Custom initialization |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create the pointer to the view you want to become the current | |
LoginWindow *loginViewController = [[LoginWindow alloc] initWithNibName:@"LoginWindow~iphone" bundle:nil]; | |
//Change current view to the new one | |
self.window.rootViewController = loginViewController; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) followUser:(NSString *)user andPass:(NSString *)pass andFolloweeId:(NSString *)followeeId | |
{ | |
NSString *apiCall = [NSString stringWithFormat:@"api2/doFollow?"]; | |
NSURL *url = [NSURL URLForContent:apiCall]; | |
NSMutableURLRequest * request = [[NSMutableURLRequest alloc] init]; | |
[request setURL:url]; | |
[request setHTTPMethod:@"POST"]; | |
NSString *postData = [NSString stringWithFormat:@"username=%@&password=%@&follow=%@",user, pass, followeeId]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The status bar is at the top of the iPhone 20px | |
[[UIApplication sharedApplication] setStatusBarHidden:YES]; |