Runtime custom attributes in IB for iPhone not working

I have a strange problem.

I am trying to set up a User Defined Runtime Attribute in IB. As shown below, I am setting the NSString attribute statID in my viewController and would like to give it a test value of 00000 in IB

User Defined Runtime Attributes

When I compile that I get this error when creating: "Custom runtime attributes in Mac OS X versions prior to 10.6"

I know that I can configure custom attributes in iOS from iOS documents found here go to the section "Setting runtime attributes for custom Objects"

Any idea why it gives me an error?

+15
iphone interface-builder
Oct 20 '10 at 16:40
source share
3 answers

Ok, I got an answer.

So there it is.

I am using the beta version of Xcode 4. Since it is a beta version, it has errors, one of them displays the "Custom runtime attributes" window in IB. The "Custom Runtime Attributes in Mac OS X Versions 10.6" error tells you that the Custom Runtime Attributes option is only availabe for OS X applications , not iOS.

It disappoints me, but at least I don't have to wonder why this is not working.

+9
Oct 21 '10 at 11:44
source share

Custom runtime attributes are now available in Xcode 4.2. However, this requires:

  • Compiling with iOS 5.0.
  • Setting the .xib Version Attribute to 4.2
  • Work in a simulator or device with iOS 5.0. The old version does not work.
+26
Oct 29 '11 at 3:16
source share

I am going to answer this question again because I think the @AntonioVieiro comment is so useful and because it can be made to work.

the error I saw was: "Size type user-defined runtime attributes with Xcode versions prior to 4.3." For a while I ignored him, because everything happened, despite the diagnosis. but he always beat me that I run Xcode 4.3.2 and get this error.

the link to ignore an invalid error warning in Xcode4 indicates a solution that gets rid of errors: it is step-by-step and very useful. and this allows you to use custom runtime attributes in iOS.

+1
Jun 27 '12 at 10:14
source share



All Articles