I have subclassed a `UIView` class and I create multiple instances of this class in a loop (incrementing each time), however when I try to set the tag of the view, and log it to the console after they are all created, they all have a tag of 1, regardless of what I set the tag as.

Any help would be appreciated, Thanks!

My Code for creating the subview is here:

```
//for() loop above with i as counter
FlashCardView *subview = [[FlashCardView alloc] initWithFrame:frame];
subview.delegate = self;
subview.viewNum=i+10; //My attempt at a workaround but I cannot get the view with this later so it is not very helpful
[subview setTag:i+10]; //Tried this and subview.tag=i+10;
NSLog(@"%d", subview.tag); //Prints correctly
//Gets added to parent later

```

This `NSLog` logs the correct tag, however when I log the tag in the `UIView` subclass, it always returns its tag as `1`. Also, if I print all the subviews of the parent in a later called method (In the `viewcontroller`), all of them have the tag 1.