Skip to content

Instantly share code, notes, and snippets.

@C4Code
Created April 3, 2013 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save C4Code/5306118 to your computer and use it in GitHub Desktop.
Save C4Code/5306118 to your computer and use it in GitHub Desktop.
Basic C4Scrollview example
//
// C4WorkSpace.m
//
// Created by Greg Debicki.
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4ScrollView *scrollview;
C4Image *table;
}
-(void)setup {
table = [C4Image imageNamed:@"C4Table"];
scrollview = [C4ScrollView scrollView:CGRectMake(0, 0, 320, 240)];
scrollview.contentSize = table.frame.size;
scrollview.borderColor = C4GREY;
scrollview.borderWidth = 1.0f;
scrollview.center = self.canvas.center;
[scrollview addImage:table];
[self.canvas addSubview:scrollview];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment