{"id":441,"date":"2013-09-11T16:09:39","date_gmt":"2013-09-11T14:09:39","guid":{"rendered":"http:\/\/www.albertopasca.it\/whiletrue\/?p=441"},"modified":"2018-05-25T17:28:50","modified_gmt":"2018-05-25T15:28:50","slug":"objective-c-recognize-letter-pressed-on-uilabel","status":"publish","type":"post","link":"https:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/","title":{"rendered":"[Objective-C] Recognize letter pressed on UILabel"},"content":{"rendered":"<p>You have an UILabel and want to know which letter was pressed on touch.<\/p>\n<p>From a question on\u00a0<a href=\"http:\/\/stackoverflow.com\/questions\/4373053\/uilabel-touch-and-get-the-text-where-touched\" target=\"_blank\" rel=\"noopener\">stackoverflow<\/a>, I\u2019ve implemented in this fast and stupid way.<\/p>\n<h5>Solution<\/h5>\n<p><!--more--><\/p>\n<p>1)\u00a0<strong>Subclass UILabel<\/strong>, and add a\u00a0<strong>touchesEnded:<\/strong>\u00a0to recognize touches on your label.<br \/>\n2) Store in an array all the sizes of the letters using system method\u00a0<strong><a href=\"http:\/\/developer.apple.com\/library\/ios\/documentation\/uikit\/reference\/NSString_UIKit_Additions\/Reference\/Reference.html#\/apple_ref\/occ\/instm\/NSString\/sizeWithFont:\" target=\"_blank\" rel=\"noopener\">sizeWithFont:<\/a><\/strong><br \/>\n3) Get the touch point and compare with the letters size.<br \/>\nDone!<\/p>\n<h5>Create an UILabel subclass<\/h5>\n<p>[code lang=&#8221;java&#8221; autolinks=&#8221;false&#8221; collapse=&#8221;false&#8221; firstline=&#8221;1&#8243; gutter=&#8221;true&#8221; htmlscript=&#8221;false&#8221; light=&#8221;false&#8221; padlinenumbers=&#8221;false&#8221; smarttabs=&#8221;true&#8221; tabsize=&#8221;4&#8243; toolbar=&#8221;false&#8221;]\/\/<br \/>\n\/\/ APLabel.h<br \/>\n\/\/<br \/>\n#import &lt;uikit\/UIKit.h&gt;<\/p>\n<p>@protocol\u00a0APLabelDelegate &amp;lt;nsobject&amp;gt;<br \/>\n@required<br \/>\n&#8211;\u00a0(void)\u00a0didLetterFound:(char)letter;<br \/>\n@end<\/p>\n<p>@interface\u00a0APLabel\u00a0:\u00a0UILabel<br \/>\n@property\u00a0(nonatomic, assign)\u00a0id\u00a0&amp;lt;aplabeldelegate&amp;gt; delegate;<br \/>\n@end[\/code]<\/p>\n<p>[code lang=&#8221;java&#8221; autolinks=&#8221;false&#8221; collapse=&#8221;false&#8221; firstline=&#8221;1&#8243; gutter=&#8221;true&#8221; htmlscript=&#8221;false&#8221; light=&#8221;false&#8221; padlinenumbers=&#8221;false&#8221; smarttabs=&#8221;true&#8221; tabsize=&#8221;4&#8243; toolbar=&#8221;false&#8221;]\/\/<br \/>\n\/\/ APLabel.m<br \/>\n\/\/<br \/>\n#import &quot;APLabel.h&quot;<\/p>\n<p>@implementation\u00a0APLabel<\/p>\n<p>&#8211;\u00a0(id)initWithCoder:(NSCoder\u00a0*)aDecoder<br \/>\n{<br \/>\n  if\u00a0(\u00a0self\u00a0=\u00a0[super initWithCoder:aDecoder])<br \/>\n  {<br \/>\n    self.backgroundColor \u00a0 \u00a0 \u00a0 \u00a0 \u00a0=\u00a0[UIColor greenColor];<br \/>\n    self.userInteractionEnabled \u00a0\u00a0=\u00a0YES;<br \/>\n  }<br \/>\n  return\u00a0self;<br \/>\n}<\/p>\n<p>&#8211;\u00a0(void)touchesEnded:(NSSet\u00a0*)touches withEvent:(UIEvent\u00a0*)event<br \/>\n{<br \/>\n  UITouch\u00a0*touch\u00a0=\u00a0[[touches allObjects]\u00a0objectAtIndex:0];<br \/>\n  CGPoint pos \u00a0 \u00a0=\u00a0[touch locationInView:self];<\/p>\n<p>  int\u00a0sizes[self.text.length];<br \/>\n  for\u00a0(\u00a0int\u00a0i=0; i&amp;lt;self .text.length; i++\u00a0)<br \/>\n  {<br \/>\n    char\u00a0letter \u00a0 \u00a0 \u00a0 \u00a0\u00a0=\u00a0[self.text characterAtIndex:i];<br \/>\n    NSString\u00a0*letterStr\u00a0=\u00a0[NSString\u00a0stringWithFormat:@&quot;%c&quot;, letter];<\/p>\n<p>    CGSize letterSize \u00a0\u00a0=\u00a0[letterStr sizeWithFont:self.font];<br \/>\n    sizes[i]\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0=\u00a0letterSize.width;<br \/>\n  }<\/p>\n<p>  int\u00a0sum\u00a0=\u00a00;<br \/>\n  for\u00a0(\u00a0int\u00a0i=0; i&amp;lt;self.text.length; i++)<br \/>\n  {<br \/>\n    sum\u00a0+=\u00a0sizes[i];<br \/>\n    if\u00a0(\u00a0sum &amp;gt;=\u00a0pos.x\u00a0)<br \/>\n    {<br \/>\n      [\u00a0_delegate didLetterFound:[\u00a0self.text characterAtIndex:i]\u00a0];<br \/>\n      return;<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n@end[\/code]<\/p>\n<p>Next, from Interface Builder, create an\u00a0<strong>UILabel<\/strong>\u00a0and change the class with\u00a0<strong>APLabel<\/strong>, like this:<br \/>\n<a href=\"https:\/\/i0.wp.com\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2013\/09\/Schermata-2013-09-11-alle-11.26.59.png\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2615\" src=\"https:\/\/i0.wp.com\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2013\/09\/Schermata-2013-09-11-alle-11.26.59.png?resize=812%2C358\" sizes=\"auto, (max-width: 812px) 100vw, 812px\" srcset=\"http:\/\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2013\/09\/Schermata-2013-09-11-alle-11.26.59-300x132.png 300w, http:\/\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2013\/09\/Schermata-2013-09-11-alle-11.26.59.png 812w\" alt=\"Schermata 2013-09-11 alle 11.26.59\" width=\"812\" height=\"358\" \/><\/a><\/p>\n<p>On your ViewController, add the\u00a0<strong>APLabelDelegate<\/strong>\u00a0and the\u00a0<strong>IBOutlets<\/strong><\/p>\n<p>[code lang=&#8221;java&#8221; autolinks=&#8221;false&#8221; collapse=&#8221;false&#8221; firstline=&#8221;1&#8243; gutter=&#8221;true&#8221; htmlscript=&#8221;false&#8221; light=&#8221;false&#8221; padlinenumbers=&#8221;false&#8221; smarttabs=&#8221;true&#8221; tabsize=&#8221;4&#8243; toolbar=&#8221;false&#8221;]@interface\u00a0APViewController\u00a0:\u00a0UIViewController &lt;APLabelDelegate&gt;<br \/>\n{<br \/>\n  IBOutlet UILabel\u00a0*_LetterFound;<br \/>\n  IBOutlet APLabel\u00a0*_myLabel;<br \/>\n}<br \/>\n@end[\/code]<\/p>\n<p>In your implementation, set the delegate and implement it:<\/p>\n<p>[code lang=&#8221;java&#8221; autolinks=&#8221;false&#8221; collapse=&#8221;false&#8221; firstline=&#8221;1&#8243; gutter=&#8221;true&#8221; htmlscript=&#8221;false&#8221; light=&#8221;false&#8221; padlinenumbers=&#8221;false&#8221; smarttabs=&#8221;true&#8221; tabsize=&#8221;4&#8243; toolbar=&#8221;false&#8221;]#import &quot;APViewController.h&quot;<\/p>\n<p>@implementation\u00a0APViewController<br \/>\n&#8211;\u00a0(void)viewDidLoad<br \/>\n{<br \/>\n  [super viewDidLoad];<br \/>\n  _myLabel.delegate\u00a0=\u00a0self;<br \/>\n}<\/p>\n<p>&#8211;\u00a0(void)didLetterFound:(char)letter<br \/>\n{<br \/>\n  _LetterFound.text\u00a0=\u00a0[NSString\u00a0stringWithFormat:@&quot;%c&quot;, letter];<br \/>\n}<br \/>\n@end[\/code]<\/p>\n<p>Connect everything, build, run and click letters!<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2013\/09\/Schermata-2013-09-11-alle-11.14.25.png\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2614\" src=\"https:\/\/i0.wp.com\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2013\/09\/Schermata-2013-09-11-alle-11.14.25.png?resize=294%2C271\" alt=\"Schermata 2013-09-11 alle 11.14.25\" width=\"294\" height=\"271\" \/><\/a><\/p>\n<p>Have fun.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You have an UILabel and want to know which letter was pressed on touch. From a question on\u00a0stackoverflow, I\u2019ve implemented in this fast and stupid way. Solution<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[265,87,167,266,264],"class_list":["post-441","post","type-post","status-publish","format-standard","hentry","category-generic","tag-event","tag-ios","tag-objectivec","tag-touch","tag-uiletter"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[Objective-C] Recognize letter pressed on UILabel - while (true) {\u00a0}<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Objective-C] Recognize letter pressed on UILabel - while (true) {\u00a0}\" \/>\n<meta property=\"og:description\" content=\"You have an UILabel and want to know which letter was pressed on touch. From a question on\u00a0stackoverflow, I\u2019ve implemented in this fast and stupid way. Solution\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/\" \/>\n<meta property=\"og:site_name\" content=\"while (true) {\u00a0}\" \/>\n<meta property=\"article:published_time\" content=\"2013-09-11T14:09:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-05-25T15:28:50+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2013\/09\/Schermata-2013-09-11-alle-11.26.59.png\" \/>\n<meta name=\"author\" content=\"Alberto Pasca\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@lupasca\" \/>\n<meta name=\"twitter:site\" content=\"@lupasca\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alberto Pasca\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/objective-c-recognize-letter-pressed-on-uilabel\\\/#article\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/objective-c-recognize-letter-pressed-on-uilabel\\\/\"},\"author\":{\"name\":\"Alberto Pasca\",\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#\\\/schema\\\/person\\\/d3cf0df774eb4aac797f246a795e9fac\"},\"headline\":\"[Objective-C] Recognize letter pressed on UILabel\",\"datePublished\":\"2013-09-11T14:09:39+00:00\",\"dateModified\":\"2018-05-25T15:28:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/objective-c-recognize-letter-pressed-on-uilabel\\\/\"},\"wordCount\":398,\"publisher\":{\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#\\\/schema\\\/person\\\/d3cf0df774eb4aac797f246a795e9fac\"},\"image\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/objective-c-recognize-letter-pressed-on-uilabel\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/Schermata-2013-09-11-alle-11.26.59.png\",\"keywords\":[\"event\",\"iOS\",\"objectivec\",\"touch\",\"uiletter\"],\"articleSection\":[\"generic\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/objective-c-recognize-letter-pressed-on-uilabel\\\/\",\"url\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/objective-c-recognize-letter-pressed-on-uilabel\\\/\",\"name\":\"[Objective-C] Recognize letter pressed on UILabel - while (true) {\u00a0}\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/objective-c-recognize-letter-pressed-on-uilabel\\\/#primaryimage\"},\"image\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/objective-c-recognize-letter-pressed-on-uilabel\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/Schermata-2013-09-11-alle-11.26.59.png\",\"datePublished\":\"2013-09-11T14:09:39+00:00\",\"dateModified\":\"2018-05-25T15:28:50+00:00\",\"breadcrumb\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/objective-c-recognize-letter-pressed-on-uilabel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/objective-c-recognize-letter-pressed-on-uilabel\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/objective-c-recognize-letter-pressed-on-uilabel\\\/#primaryimage\",\"url\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/Schermata-2013-09-11-alle-11.26.59.png\",\"contentUrl\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/Schermata-2013-09-11-alle-11.26.59.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/objective-c-recognize-letter-pressed-on-uilabel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Objective-C] Recognize letter pressed on UILabel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#website\",\"url\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/\",\"name\":\"while (true) {\u00a0}\",\"description\":\"notes from a developer, tutorials, how-to, ideas\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#\\\/schema\\\/person\\\/d3cf0df774eb4aac797f246a795e9fac\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#\\\/schema\\\/person\\\/d3cf0df774eb4aac797f246a795e9fac\",\"name\":\"Alberto Pasca\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g\",\"caption\":\"Alberto Pasca\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g\"},\"description\":\"Software engineer @ Pirelli &amp; C. S.p.A. with a strong passion for mobile \uf8ff development, security, and connected things.\",\"sameAs\":[\"https:\\\/\\\/www.albertopasca.it\",\"albertopasca\",\"https:\\\/\\\/x.com\\\/lupasca\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Objective-C] Recognize letter pressed on UILabel - while (true) {\u00a0}","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/","og_locale":"en_US","og_type":"article","og_title":"[Objective-C] Recognize letter pressed on UILabel - while (true) {\u00a0}","og_description":"You have an UILabel and want to know which letter was pressed on touch. From a question on\u00a0stackoverflow, I\u2019ve implemented in this fast and stupid way. Solution","og_url":"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/","og_site_name":"while (true) {\u00a0}","article_published_time":"2013-09-11T14:09:39+00:00","article_modified_time":"2018-05-25T15:28:50+00:00","og_image":[{"url":"http:\/\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2013\/09\/Schermata-2013-09-11-alle-11.26.59.png","type":"","width":"","height":""}],"author":"Alberto Pasca","twitter_card":"summary_large_image","twitter_creator":"@lupasca","twitter_site":"@lupasca","twitter_misc":{"Written by":"Alberto Pasca","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/#article","isPartOf":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/"},"author":{"name":"Alberto Pasca","@id":"https:\/\/www.albertopasca.it\/whiletrue\/#\/schema\/person\/d3cf0df774eb4aac797f246a795e9fac"},"headline":"[Objective-C] Recognize letter pressed on UILabel","datePublished":"2013-09-11T14:09:39+00:00","dateModified":"2018-05-25T15:28:50+00:00","mainEntityOfPage":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/"},"wordCount":398,"publisher":{"@id":"https:\/\/www.albertopasca.it\/whiletrue\/#\/schema\/person\/d3cf0df774eb4aac797f246a795e9fac"},"image":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/#primaryimage"},"thumbnailUrl":"http:\/\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2013\/09\/Schermata-2013-09-11-alle-11.26.59.png","keywords":["event","iOS","objectivec","touch","uiletter"],"articleSection":["generic"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/","url":"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/","name":"[Objective-C] Recognize letter pressed on UILabel - while (true) {\u00a0}","isPartOf":{"@id":"https:\/\/www.albertopasca.it\/whiletrue\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/#primaryimage"},"image":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/#primaryimage"},"thumbnailUrl":"http:\/\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2013\/09\/Schermata-2013-09-11-alle-11.26.59.png","datePublished":"2013-09-11T14:09:39+00:00","dateModified":"2018-05-25T15:28:50+00:00","breadcrumb":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/#primaryimage","url":"http:\/\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2013\/09\/Schermata-2013-09-11-alle-11.26.59.png","contentUrl":"http:\/\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2013\/09\/Schermata-2013-09-11-alle-11.26.59.png"},{"@type":"BreadcrumbList","@id":"http:\/\/www.albertopasca.it\/whiletrue\/objective-c-recognize-letter-pressed-on-uilabel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.albertopasca.it\/whiletrue\/"},{"@type":"ListItem","position":2,"name":"[Objective-C] Recognize letter pressed on UILabel"}]},{"@type":"WebSite","@id":"https:\/\/www.albertopasca.it\/whiletrue\/#website","url":"https:\/\/www.albertopasca.it\/whiletrue\/","name":"while (true) {\u00a0}","description":"notes from a developer, tutorials, how-to, ideas","publisher":{"@id":"https:\/\/www.albertopasca.it\/whiletrue\/#\/schema\/person\/d3cf0df774eb4aac797f246a795e9fac"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.albertopasca.it\/whiletrue\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.albertopasca.it\/whiletrue\/#\/schema\/person\/d3cf0df774eb4aac797f246a795e9fac","name":"Alberto Pasca","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g","caption":"Alberto Pasca"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g"},"description":"Software engineer @ Pirelli &amp; C. S.p.A. with a strong passion for mobile \uf8ff development, security, and connected things.","sameAs":["https:\/\/www.albertopasca.it","albertopasca","https:\/\/x.com\/lupasca"]}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/posts\/441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/comments?post=441"}],"version-history":[{"count":2,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/posts\/441\/revisions"}],"predecessor-version":[{"id":854,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/posts\/441\/revisions\/854"}],"wp:attachment":[{"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/media?parent=441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/categories?post=441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/tags?post=441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}