2

I have some UILabels, titles and the like, whose text is determined programmatically at runtime. It would be nice to see something on the storyboard to indicate the label is there, and that that scene is expected to display, for example, username.

However, it seems disingenuous to add an unused string to the project, and I want to avoid the situation of deciding whether to localize dummy text. I found one approach with a user defined runtime attribute, Clear Label text used in Storyboard, that wouldn't avoid things turning up in MainStoryboard.strings localizations. This seems like overkill if there was a way to annotate the storyboard or otherwise mark a sample value...

What should one do in this situation? A) Live with empty labels on storyboard B) Refactor the project to create labels programmatically C) The solution at Clear Label text used in Storyboard D) Other

Community
  • 1
  • 1
yarp
  • 47
  • 6
  • question's title and body don't match. – vikingosegundo Jun 26 '15 at 15:49
  • how so, @vikingosegundo? – yarp Jun 26 '15 at 16:44
  • Counter question: how is it related? – vikingosegundo Jun 26 '15 at 16:45
  • "I have some UILabels, titles and the like, whose text is determined programmatically at runtime..." Perhaps asking what you would do with the initial text of those labels is not related to the best practice? – yarp Jun 26 '15 at 17:03
  • I don't see how this relates to the title. Anyway: best practices questions are considered not matching to the Stackoverflow format "clear question — clear answers". Voting for closure. – vikingosegundo Jun 26 '15 at 17:07
  • Surely there is a policy regarding clarity in criticisms, however the second is reasonable; edited. – yarp Jun 26 '15 at 17:22
  • Your edit did not address the unclear title. – vikingosegundo Jun 26 '15 at 17:24
  • Your reply did not address mine regarding the title. Move to chat. – yarp Jun 26 '15 at 17:26
  • It is in your interest to write clear question with matching titles. Otherwise you should not expect any (fitting) answer. And you should avoid the term "best practice" as it is a strong indicator to be too broad or opinion based – bother closure reasons. – vikingosegundo Jun 26 '15 at 17:31
  • The title matches, even if it isn't clear. It is in your interest to make sense. – yarp Jun 26 '15 at 17:33
  • I don't want an answer here – you do. – vikingosegundo Jun 26 '15 at 17:34
  • My point is that insisting on false distracting claims about the title tend to make me want one less. – yarp Jun 26 '15 at 17:37
  • Well, you're free to post here or not. If you don't like this community's rule and culture: don't. If you want to post here inform yourself about the standards we have. – vikingosegundo Jun 26 '15 at 17:41
  • Another hint: if you want the standards and/or culture to change: head over to meta.stackoverflow.com and discuss them there. – vikingosegundo Jun 26 '15 at 17:45
  • It's less work to parse accurate sloppy text that recur on beautifully presented and precisely incorrect axioms; that's a value I would like to share against this community. – yarp Jun 26 '15 at 17:46
  • Can't be bothered, too much work talking to you. And I'm not going to court to rewrite some rules about clearness. – yarp Jun 26 '15 at 17:48
  • After (title != title) -> true, I have a right to say anything. – yarp Jun 26 '15 at 17:49

1 Answers1

0

What I do is (D) supply dummy text for the label in the storyboard, and I don't see what's wrong with that.

matt
  • 515,959
  • 87
  • 875
  • 1,141