object cannot be set - either read-only property or no setter found
        Posted  
        
            by Sheehan Alam
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Sheehan Alam
        
        
        
        Published on 2010-03-17T18:16:06Z
        Indexed on 
            2010/03/17
            18:21 UTC
        
        
        Read the original article
        Hit count: 610
        
I am having trouble over simply assigning a value to a UI Button:
//Assume rect is defined
rect = CGRectMake(13, 10, 48, 48);
profileButton = [[UIButton alloc] initWithFrame:rect];
profileButton.buttonType = UIButtonTypeCustom;
I am getting "object cannot be set - either read-only property or setter found" when trying to assign the buttonType to UIButtonTypeCustom.
© Stack Overflow or respective owner