Created
April 3, 2013 22:40
-
-
Save C4Code/5306118 to your computer and use it in GitHub Desktop.
Basic C4Scrollview example
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
// | |
// 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