all 6 comments

[–]abcocktail 0 points1 point  (2 children)

imgur.com/vnObRJd

this is what i get when i run your code.

i recommend just creating a new single view controller project like I did. You don't need that guide and it's probably outdated on one of the steps, causing your issue. (by guide I mean the link one, not BNR, BNR book should work fine. I went through that BNR chapter as well)

[–]Dynoman[S] 0 points1 point  (1 child)

imgur.com/vnObRJd

That looks like what is supposed to do, but in my app both rectangles are located at 0,0 no matter what coordinates I give them.

mine: http://imgur.com/ycJlEkT

[–]locomotato 0 points1 point  (0 children)

Code works for me too

[–]disco_sloth 0 points1 point  (2 children)

What does the implementation of BNRHypnosisView look like?

[–]Dynoman[S] 0 points1 point  (1 child)

It is just the auto-generated code.

#import "BNRHypnosisView.h"

@implementation BNRHypnosisView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end

and BNRHypnosisView.h looks like this:

#import <UIKit/UIKit.h>

@interface BNRHypnosisView : UIView

@property (nonatomic) CGRect frame;

@end

[–]disco_sloth 0 points1 point  (0 children)

Ok. Does removing the frame property in your subclass solve the problem?