• 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: Automatically replacing part of text in a text label
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatically replacing part of text in a text label


  • Subject: Re: Automatically replacing part of text in a text label
  • From: Peter Zegelin <email@hidden>
  • Date: Tue, 17 Mar 2009 16:25:49 +1100


On 16/03/2009, at 6:52 PM, Mark Ritchie wrote:

On 16-Mar-09, at 2:20 AM, Peter Zegelin wrote:
I would like this registration dialog to be general enough that I can use it in multiple applications. Is there a simple way to replace the xxx with the actual application name at runtime? At the moment I'm thinking I'll have to wire every label up to my registration controller and do it in awakeFromNib, but I was hoping for something easier.

Bit the bullet now and wire up each label. That way, when you go to localize your application, you've already got the connections that you might need! ;-)


In terms of the actual replace, NSString has a bunch of options similar to this:
- (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement


Good luck!
M.

Thanks Mark,

I suspected as much. And thanks for the replace method - just what I'll need.


Peter _______________________________________________

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: 
 >Automatically replacing part of text in a text label (From: Peter Zegelin <email@hidden>)
 >Re: Automatically replacing part of text in a text label (From: Mark Ritchie <email@hidden>)

  • Prev by Date: Re: Debugging CoreData relationship changes?
  • Next by Date: Re: Enforcing trial software on Mac
  • Previous by thread: Re: Automatically replacing part of text in a text label
  • Next by thread: Re: Automatically replacing part of text in a text label
  • Index(es):
    • Date
    • Thread