• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iOS IB Object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS IB Object


  • Subject: Re: iOS IB Object
  • From: Fritz Anderson <email@hidden>
  • Date: Wed, 22 Aug 2012 09:27:38 -0500

On 22 Aug 2012, at 12:03 AM, koko <email@hidden> wrote:

> I put an Object (the orange cube) into my xib and set its custom class.
>
> I connected an action in the custom class to a UIButton.
>
> Sometimes the action is called when the button is clicked but most of the  time there is a crash .. unrecognized selector sent to instance …hmm?
>
> Wanting to move ahead I moved the action into a UIView and presto no more crash.
>
> I do this for OSX, use the blue object cube, assign custom class, connect actions and outlets and all works feel.
>
> So, what doI not know about iOS and a similar process? It is like the custom class object does not exist.

If you don't retain a top-level NIB object in iOS, sooner or later it _won't_ exist. They are retain/autoreleased upon load, and if there is no strong reference, they get deallocated.

See <http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html> and search for "Managing Nib Objects in iOS."

	— F


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >iOS IB Object (From: koko <email@hidden>)

  • Prev by Date: Re: Implementing Manual KVO For Bitfields Set in Atomic Operations
  • Next by Date: Re: Implementing Manual KVO For Bitfields Set in Atomic Operations
  • Previous by thread: iOS IB Object
  • Next by thread: Crash with UITableView reloadRowsAtIndexPaths:withRowAnimation:
  • Index(es):
    • Date
    • Thread