{"id":4095,"date":"2010-02-13T15:30:09","date_gmt":"2010-02-13T10:00:09","guid":{"rendered":"http:\/\/mobisoftinfotech.com\/?p=4095"},"modified":"2024-11-18T16:05:44","modified_gmt":"2024-11-18T10:35:44","slug":"iphone-segmented-controluisegmentedcontrol-tutorial","status":"publish","type":"post","link":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial","title":{"rendered":"iPhone Segmented Control:UISegmentedControl Tutorial"},"content":{"rendered":"<p>A segmented control shows a horizontal list of items. Each segment looks like a button. The segments remains \u201cpressed\u201d even after the user lifts his finger.When a different segment is tapped, its corresponding value can be obtained.<br>\nSegmented control comes in handy when you want to show\/hide different data without changing the current view.For e.g you can have a set of images and you display only one when a segment is selected. When you select a different segment, depending on that, the picture changes.<\/p>\n<p>So lets get started.:<\/p>\n<p>Step 1:Start Xcode and create a <a href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-view-based-application-from-scratch\">view based application<\/a> with name \u201cSegmentedControlDemo\u201d.<\/p>\n<p>Step 2:Open the \u201cSegmentedControlDemoViewController.h\u201d file and put the following code in it.<\/p>\n<pre>[objc highlight=\"3,4,7,8,10\"]\n#import &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;UIKit\/UIKit.h&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;\n@interface SegmentedControlDemoViewController : UIViewController {\nUILabel *segmentLabel;\nUISegmentedControl *segmentedControl;\n}\n\n@property (nonatomic,retain) IBOutlet UILabel *segmentLabel;\n@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl;\n\n-(IBAction) segmentedControlIndexChanged;\n\n@end\n[\/objc]<\/pre>\n<p>Here, we have declared a label and segmented control and set properties and outlets for both of them.<\/p>\n<p>Step 3:Open the \u201cSegmentedControlDemoViewController.m\u201d file. Synthesize both the properties and release them.Also provide the implementation for segmentedControlIndexChanged method.<\/p>\n<pre>[objc highlight=\"4,5,9,14,15,19,20,21,22,23,24,25,26,27,28,29,30,31,32\"]\n#import &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;SegmentedControlDemoViewController.h&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;\n\n@implementation SegmentedControlDemoViewController\n@synthesize segmentLabel;\n@synthesize segmentedControl;\n\n\/\/ Implement viewDidLoad to do additional setup after loading the view.\n- (void)viewDidLoad {\n\tself.segmentLabel.text =@&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;Segment 1 selected.&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;;\n\t[super viewDidLoad];\n}\n\n- (void)dealloc {\n\t[segmentLabel release];\n\t[segmentedControl release];\n\t[super dealloc];\n}\n\n-(IBAction) segmentedControlIndexChanged{\n\tswitch (self.segmentedControl.selectedSegmentIndex) {\n\t\tcase 0:\n\t\t\tself.segmentLabel.text =@&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;Segment 1 selected.&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tself.segmentLabel.text =@&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;Segment 2 selected.&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\t break;\n\t }\n\n}\n\n@end\n[\/objc]<\/pre>\n<p>In the segmentedControlIndexChanged method, we have used a switch case which switches the selected segment index of the segmented control. For each case, we have set the text of the label to the respective segment selected.<\/p>\n<p>Step 4: Save(command+s) the project.Now open the \u201cSegmentedControlDemoViewController.xib\u201d file from the Resources folder. Drag and drop a label and a segmented control from the library on the view as shown below. Stretch the edges of the label so that it becomes long enough to display \u201cSegment x selected.\u201d<\/p>\n<p style=\"text-align: center;\"><strong>Xib after adding segmented control and label&#8221;<\/strong><\/p>\n<p>Note: If you want more than two segments in the segmented control, go to Attributes Inspector for segmented control and change the value for Segments field.<\/p>\n<p>Step 5:Select the File&#8217;s Owner in the xib window and open its Connections Inspector(command+2) and make the following connections.<\/p>\n<p>Connect segmentControl to segmented control and segmentLabel to label. The Connections Inspector for File&#8217;s Owner will then look like this:<\/p>\n<p><strong>Connections<\/strong><\/p>\n<p>Step 6: Open the Connections Inspector for segmented control and link the value changed argument to the segmentedControlIndexChanged method in the File&#8217;s Owner.<\/p>\n<p><strong>Connection<\/strong><\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39.png\"><noscript><img decoding=\"async\" class=\"size-medium wp-image-165\" src=\"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39-300x150.png\" alt=\"iPhone Segmented Control:UISegmentedControl Tutorial\" width=\"300\" height=\"150\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39-300x150.png 300w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39.png 988w\" sizes=\"(max-width: 300px) 100vw, 300px\"><\/noscript><img decoding=\"async\" class=\"size-medium wp-image-165 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20300%20150%22%3E%3C%2Fsvg%3E\" alt=\"iPhone Segmented Control:UISegmentedControl Tutorial\" width=\"300\" height=\"150\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20300%20150%22%3E%3C%2Fsvg%3E 300w\" sizes=\"(max-width: 300px) 100vw, 300px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39-300x150.png 300w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39.png 988w\" data-src=\"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39-300x150.png\"><\/a><\/p>\n<p>Step 7: Build and run the project. You will see that when you tap different segments of the segmented control, the text of the label changes.<\/p>\n<div>\n<p>You can download the source code <a href=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/SegmentedControlDemo.zip\">here<\/a>.<\/p>\n<p>OUTPUT:<\/p>\n<\/div>\n<div>\n<p><strong>Output1<\/strong><\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-4-09-53-31.png\"><noscript><img decoding=\"async\" class=\"size-medium wp-image-167\" src=\"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-4-09-53-31-161x300.png\" alt=\"iPhone Segmented Control:UISegmentedControl Tutorial\" width=\"161\" height=\"300\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-4-09-53-31-161x300.png 161w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-4-09-53-31.png 414w\" sizes=\"(max-width: 161px) 100vw, 161px\"><\/noscript><img decoding=\"async\" class=\"size-medium wp-image-167 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20161%20300%22%3E%3C%2Fsvg%3E\" alt=\"iPhone Segmented Control:UISegmentedControl Tutorial\" width=\"161\" height=\"300\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20161%20300%22%3E%3C%2Fsvg%3E 161w\" sizes=\"(max-width: 161px) 100vw, 161px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-4-09-53-31-161x300.png 161w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-4-09-53-31.png 414w\" data-src=\"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-4-09-53-31-161x300.png\"><\/a><\/p>\n<p><strong>Output2<\/strong><\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-5-09-53-31.png\"><noscript><img decoding=\"async\" class=\"size-medium wp-image-169\" src=\"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-5-09-53-31-161x300.png\" alt=\"iPhone Segmented Control:UISegmentedControl Tutorial\" width=\"161\" height=\"300\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-5-09-53-31-161x300.png 161w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-5-09-53-31.png 414w\" sizes=\"(max-width: 161px) 100vw, 161px\"><\/noscript><img decoding=\"async\" class=\"size-medium wp-image-169 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20161%20300%22%3E%3C%2Fsvg%3E\" alt=\"iPhone Segmented Control:UISegmentedControl Tutorial\" width=\"161\" height=\"300\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20161%20300%22%3E%3C%2Fsvg%3E 161w\" sizes=\"(max-width: 161px) 100vw, 161px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-5-09-53-31-161x300.png 161w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-5-09-53-31.png 414w\" data-src=\"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-5-09-53-31-161x300.png\"><\/a><\/p>\n<\/div>\n<div>\n<p>Thats all folks! You are now ready to meddle with segmented control.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>A segmented control shows a horizontal list of items. Each segment looks like a button. The segments remains \u201cpressed\u201d even after the user lifts his finger.When a different segment is tapped, its corresponding value can be obtained. Segmented control comes in handy when you want to show\/hide different data without changing the current view.For e.g [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"yes","footnotes":""},"categories":[3],"tags":[328,52,53],"class_list":["post-4095","post","type-post","status-publish","format-standard","hentry","category-iphone","tag-iphone-ipad","tag-segmented-control","tag-uisegmentedcontrol"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>iPhone Segmented Control:UISegmentedControl Tutorial - Mobisoft Infotech<\/title>\n<meta name=\"description\" content=\"A segmented control shows a horizontal list of items.Learn more on iPhone segmented control a detailed UISegmented Control tutorial\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"iPhone Segmented Control:UISegmentedControl Tutorial - Mobisoft Infotech\" \/>\n<meta property=\"og:description\" content=\"A segmented control shows a horizontal list of items.Learn more on iPhone segmented control a detailed UISegmented Control tutorial\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial\" \/>\n<meta property=\"og:site_name\" content=\"Mobisoft Infotech\" \/>\n<meta property=\"article:published_time\" content=\"2010-02-13T10:00:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-18T10:35:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39.png\" \/>\n\t<meta property=\"og:image:width\" content=\"988\" \/>\n\t<meta property=\"og:image:height\" content=\"497\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ruchi Raval\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ruchi Raval\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#article\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial\"},\"author\":{\"name\":\"Ruchi Raval\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/6975ec0e158682ee8e5f4fbd7221b932\"},\"headline\":\"iPhone Segmented Control:UISegmentedControl Tutorial\",\"datePublished\":\"2010-02-13T10:00:09+00:00\",\"dateModified\":\"2024-11-18T10:35:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial\"},\"wordCount\":394,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#primaryimage\"},\"thumbnailUrl\":\"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39-300x150.png\",\"keywords\":[\"iPhone \u2013 iPad\",\"Segmented Control\",\"UISegmentedControl\"],\"articleSection\":[\"iPhone - iPad\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial\",\"name\":\"iPhone Segmented Control:UISegmentedControl Tutorial - Mobisoft Infotech\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#primaryimage\"},\"thumbnailUrl\":\"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39-300x150.png\",\"datePublished\":\"2010-02-13T10:00:09+00:00\",\"dateModified\":\"2024-11-18T10:35:44+00:00\",\"author\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/6975ec0e158682ee8e5f4fbd7221b932\"},\"description\":\"A segmented control shows a horizontal list of items.Learn more on iPhone segmented control a detailed UISegmented Control tutorial\",\"breadcrumb\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#primaryimage\",\"url\":\"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39-300x150.png\",\"contentUrl\":\"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39-300x150.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mobisoftinfotech.com\/resources\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"iPhone Segmented Control:UISegmentedControl Tutorial\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/\",\"name\":\"Mobisoft Infotech\",\"description\":\"Discover Mobility\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/6975ec0e158682ee8e5f4fbd7221b932\",\"name\":\"Ruchi Raval\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/c48187f401d31f2a08585cb66b4503c90f0586889e7212ae0680cd4edcb9910e?s=96&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c48187f401d31f2a08585cb66b4503c90f0586889e7212ae0680cd4edcb9910e?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c48187f401d31f2a08585cb66b4503c90f0586889e7212ae0680cd4edcb9910e?s=96&r=g\",\"caption\":\"Ruchi Raval\"},\"sameAs\":[\"http:\/\/www.mobisoftinfotech.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"iPhone Segmented Control:UISegmentedControl Tutorial - Mobisoft Infotech","description":"A segmented control shows a horizontal list of items.Learn more on iPhone segmented control a detailed UISegmented Control tutorial","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":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial","og_locale":"en_US","og_type":"article","og_title":"iPhone Segmented Control:UISegmentedControl Tutorial - Mobisoft Infotech","og_description":"A segmented control shows a horizontal list of items.Learn more on iPhone segmented control a detailed UISegmented Control tutorial","og_url":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial","og_site_name":"Mobisoft Infotech","article_published_time":"2010-02-13T10:00:09+00:00","article_modified_time":"2024-11-18T10:35:44+00:00","og_image":[{"width":988,"height":497,"url":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39.png","type":"image\/png"}],"author":"Ruchi Raval","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ruchi Raval","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#article","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial"},"author":{"name":"Ruchi Raval","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/6975ec0e158682ee8e5f4fbd7221b932"},"headline":"iPhone Segmented Control:UISegmentedControl Tutorial","datePublished":"2010-02-13T10:00:09+00:00","dateModified":"2024-11-18T10:35:44+00:00","mainEntityOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial"},"wordCount":394,"commentCount":0,"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#primaryimage"},"thumbnailUrl":"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39-300x150.png","keywords":["iPhone \u2013 iPad","Segmented Control","UISegmentedControl"],"articleSection":["iPhone - iPad"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial","url":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial","name":"iPhone Segmented Control:UISegmentedControl Tutorial - Mobisoft Infotech","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#primaryimage"},"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#primaryimage"},"thumbnailUrl":"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39-300x150.png","datePublished":"2010-02-13T10:00:09+00:00","dateModified":"2024-11-18T10:35:44+00:00","author":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/6975ec0e158682ee8e5f4fbd7221b932"},"description":"A segmented control shows a horizontal list of items.Learn more on iPhone segmented control a detailed UISegmented Control tutorial","breadcrumb":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#primaryimage","url":"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39-300x150.png","contentUrl":"https:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2010\/02\/Picture-2-09-53-39-300x150.png"},{"@type":"BreadcrumbList","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-segmented-controluisegmentedcontrol-tutorial#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mobisoftinfotech.com\/resources\/"},{"@type":"ListItem","position":2,"name":"iPhone Segmented Control:UISegmentedControl Tutorial"}]},{"@type":"WebSite","@id":"https:\/\/mobisoftinfotech.com\/resources\/#website","url":"https:\/\/mobisoftinfotech.com\/resources\/","name":"Mobisoft Infotech","description":"Discover Mobility","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/6975ec0e158682ee8e5f4fbd7221b932","name":"Ruchi Raval","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c48187f401d31f2a08585cb66b4503c90f0586889e7212ae0680cd4edcb9910e?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c48187f401d31f2a08585cb66b4503c90f0586889e7212ae0680cd4edcb9910e?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c48187f401d31f2a08585cb66b4503c90f0586889e7212ae0680cd4edcb9910e?s=96&r=g","caption":"Ruchi Raval"},"sameAs":["http:\/\/www.mobisoftinfotech.com"]}]}},"_links":{"self":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/4095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/comments?post=4095"}],"version-history":[{"count":24,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/4095\/revisions"}],"predecessor-version":[{"id":32184,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/4095\/revisions\/32184"}],"wp:attachment":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/media?parent=4095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/categories?post=4095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/tags?post=4095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}