I created a custom UIView in Intefacebuilder. In my ViewController I want to create two instances of my UIViews.
So here is some code:
@interface MeineFinanzenViewController : UIViewController <UIGestureRecognizerDelegate> {
UISwipeGestureRecognizer* swipeLeft;
UISwipeGestureRecognizer* swipeRight;
//... other stuff
SaldoView* ausgabenView;
SaldoView* einnahmenView;
}
//...other stuff
@property (strong,nonatomic) IBOutlet SaldoView* ausgabenView;
@property (strong,nonatomic) IBOutlet SaldoView* einnahmenView;
//...other stuff
So I connected the same view two times. Firstly to ausgabenView and secondly to einnahmenView. BUT after that the ausgabenView becomes the same object as einnahmenView. Actually I would like to have two separated objects that are independent from each other. Now I’m asking myself how to achieve this?
Any hints?
If you are creating your views by editing your nib files graphically – as it seems you are – then if you want two views, then you drag two views onto the editor from the library. You then connect one to each outlet.