On Dec 24, 2014, at 10:28 AM, Kyle Sluder <[email protected]> wrote:

> On Wed, Dec 24, 2014, at 01:28 AM, N!K wrote:
>> The view is what came when the project was initiated. On the left side,
>> MainMenu.xib shows Placeholders, Objects, and then the window name. Below
>> it is the view name, same as file name set in Identity Inspector>Class.
>> Clicking on the view name makes the view tan colored.
>> I couldn't find any help in Google, so please, what can I do to get this
>> running correctly?
> 
> -initWithFrame: will only be called if the object in the nib is an
> instance of one of those blue "Custom View" placeholder things. If you
> change the class of an existing view object (like, say, the window's
> contentView or the document view of a scroll view), it will not get
> -initWithFrame:. This is a surprising quirk, but it happens because the
> logic for calling -initWithFrame: actually lives in the Custom View's
> -initWithCoder: implementation.
> 

> —Kyle Sluder

>   and Steve, and Roland

> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/xcode-users/pu56ucla62%40alumni.purdue.edu
> 
> This email sent to [email protected]

Thank you all for explaining what’s going on. I looked up initWithCoder; it is 
not suitable for my usage. 

I have tried again, adding a custom view assigned to class StretchView.*  Still 
no luck, initWiithFrame is ignored. Again, strokeRect puts on a colored frame, 
but no Bezier path appears.

If both icons, View (system supplied) and StretchView (my addition), are 
assigned to  class StretchView, both get the frame but no path.

Note that both icons are blue, so shouldn’t both get to initWithFrame? Please 
refer to the ScreenShot from .xib below.

A further question: Would it be worthwhile to get rid of the (system) View? If 
so, how? Deleting StretchView from both Class assignments in the Inspector did 
not  remove or disconnect them. Framed views remained the same.

Thanks,

Nick

* Yes, I’m building on Hilegass’ book’s example   :)




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to