Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (id)init {
- if (self = [super init]) {
- self.user = [User newUserWithTempData];
- }
- return self;
- }
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- self.userNameLabel.text = self.user.nameString;
- }
- #import "CircleView.h"
- @implementation CircleView
- - (void)drawRect:(CGRect)rect{
- // CUSTOM DRAWING METHOD HERE
- }
- @end
- #import <UIKit/UIKit.h>
- @class CircleView;
- @interface CreateNewQuestionCell : UITableViewCell
- @property (nonatomic, weak) IBOutlet CircleView *circleView;
- @end
- // MyUIViewController.h
- #import <UIKit/UIKit.h>
- #import "BezierGraphView.h"
- @interface MyUIViewController : UIViewController
- @property (nonatomic, strong) IBOutlet BezierGraphView *graphView;
- @property (strong) IBOutlet UISlider *xSlider;
- @property (strong) IBOutlet UISlider *ySlider;
- @property (strong) IBOutlet UISlider *zSlider;
- -(IBAction)sliderValueDidChange;
- @end
- //BezierGraphView.h
- #import <UIKit/UIKit.h>
- @interface BezierGraphView : UIView
- -(void)valuesDidChangeWithX:(CGFloat)xValue Y:(CGFloat)yValue Z:(CGFloat)zValue;
- @end
- //BezierGraphView.m
- #import "BezierGraphView.h"
- @implementation BezierGraphView
- -(void)valuesDidChangeWithX:(CGFloat)xValue Y:(CGFloat)yValue Z:(CGFloat)zValue{
- //drawRect code goes here
- }
- @end
- //MyUIViewController.m
- @implementation MyUIViewController
- //Other UIViewController stuff, like viewDidLoad
- -(IBAction)sliderValueDidChange{
- [self.graphView valuesDidChangeWithX:self.xSlider.value
- Y:self.ySlider.value
- Z:self.zSlider.value]
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement