{"id":19434,"date":"2022-11-06T17:34:52","date_gmt":"2022-11-06T12:04:52","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/"},"modified":"2022-11-06T17:34:52","modified_gmt":"2022-11-06T12:04:52","slug":"solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/","title":{"rendered":"[Solved] How to make UI with round image and round text, also add ratting icon on same circle. in iOS application"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-32437869\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"32437869\" data-parentid=\"29532633\" data-score=\"1\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<p>Import <strong>roundImageView.h<\/strong> class in your view class and set background image on your UIButton. Please change button type <strong>Custom<\/strong>.<\/p>\n<p>After Following these steps try this code . <\/p>\n<pre><code>    CGRect frame = CGRectMake(0, 0, 200, 200);\nroundImageView *roudImage = [[roundImageView alloc]init];\n\n   UIImage *image1 = [roudImage createMenuRingWithFrame:frame :@\"Your Title\" labelBgColor:[UIColor colorWithRed:(191\/255.f) green:(251\/255.f) blue:(158\/255.f) alpha:1] ringBgColor:[UIColor colorWithRed:(214\/255.f) green:(214\/255.f) blue:(214\/255.f) alpha:1] levelUnlockShow:1 buttonObj:yourButtonObj];\n  [yourButtonObj setImage:image1 forState:UIControlStateNormal];\n<\/code><\/pre>\n<p>Note :- In this you can see we set only Image not background image .. <\/p>\n<p>Create a class <strong>roundImageView<\/strong> UIImage Type and paste this code <\/p>\n<p>in <strong>roundImageView.h<\/strong> file code <\/p>\n<pre><code>#import &lt;UIKit\/UIKit.h&gt;\n\n@interface roundImageView : UIImage\n- (UIImage*) createMenuRingWithFrame:(CGRect)frame : (NSString*) sectionTitle labelBgColor : (UIColor*)labelBgColor ringBgColor : (UIColor *)ringBgColor levelUnlockShow: (NSInteger) levelUnloackNm  buttonObj : (UIButton *)buttonObj;\n<\/code><\/pre>\n<p>Paste code in <strong>roundImageView.m<\/strong> file <\/p>\n<pre><code>#import \"roundImageView.h\"\n\n@implementation roundImageView\n#define DegreesToRadians(x) (M_PI * x \/ 180.0)\n\n- (void) drawStringAtContext:(CGContextRef) context string:(NSString*) text atAngle:(float) angle withRadius:(float) radius\n{\nCGSize textSize = [text sizeWithAttributes:@{NSFontAttributeName: [UIFont fontWithName:@\"Helvetica\" size:18]}];\n\nfloat perimeter = 2 * M_PI * radius;\nfloat textAngle = textSize.width \/ perimeter * 2 * M_PI;\n\nangle += textAngle \/ 2;\n\nfor (int index = 0; index &lt; [text length]; index++)\n{\n    NSRange range = {index, 1};\n    NSString* letter = [text substringWithRange:range];\n    char* c = (char*)[letter cStringUsingEncoding:NSASCIIStringEncoding];\n    CGSize charSize = [letter sizeWithAttributes:@{NSFontAttributeName: [UIFont fontWithName:@\"Helvetica\" size:18]}];\n\n    NSLog(@\"Char %@ with size: %f x %f\", letter, charSize.width, charSize.height);\n\n    float x = radius * cos(angle);\n    float y = radius * sin(angle);\n\n    float letterAngle = (charSize.width \/ perimeter * -2 * M_PI);\n\n    CGContextSaveGState(context);\n    CGContextTranslateCTM(context, x, y);\n    CGContextRotateCTM(context, (angle - 0.5 * M_PI));\n    CGContextShowTextAtPoint(context, 0, 0, c, strlen(c));\n\n    CGContextRestoreGState(context);\n\n    angle += letterAngle;\n}\n\n}\n\n\n- (void)drawRect:(CGRect)rect contextData:(CGContextRef) context {\n\nCGContextSetLineWidth(context, 30);\nCGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor);\nCGContextBeginPath(context);\nCGContextMoveToPoint(context, 0, 50);\nCGContextAddCurveToPoint(context, 0, 180, 0, 0, -80, 0);\nCGContextStrokePath(context);\n}\n\n - (UIImage*) createMenuRingWithFrame:(CGRect)frame : (NSString*) sectionTitle labelBgColor : (UIColor*)labelBgColor ringBgColor : (UIColor *)ringBgColor levelUnlockShow: (NSInteger) levelUnloackNm  buttonObj : (UIButton *)buttonObj\n{\n\nCAShapeLayer *circle = [CAShapeLayer layer];\n\/\/ Make a circular shape\nUIBezierPath *circularPath=[UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, buttonObj.frame.size.width, buttonObj.frame.size.height) cornerRadius:MAX(buttonObj.frame.size.width, buttonObj.frame.size.height)];\n\ncircle.path = circularPath.CGPath;\n\n\/\/ Configure the apperence of the circle\ncircle.fillColor = [UIColor blackColor].CGColor;\ncircle.strokeColor = [UIColor blackColor].CGColor;\ncircle.lineWidth = 0;\n\nbuttonObj.layer.mask = circle;\nCGPoint centerPoint = CGPointMake(frame.size.width \/ 2, frame.size.height \/ 2);\nchar* fontName = (char*)[[UIFont fontWithName:@\"Helvetica\" size:18].fontName cStringUsingEncoding:NSASCIIStringEncoding];\n\nconst CGFloat* ringColorComponents = CGColorGetComponents([ringBgColor CGColor]);\n\/\/    const CGFloat* textBGColorComponents = CGColorGetComponents([[UIColor colorWithRed:80\/255.0 green:160\/255.0 blue:15\/255.0 alpha:1] CGColor]) ;\nconst CGFloat* textColorComponents =  CGColorGetComponents([[UIColor colorWithRed:0\/255.0 green:0\/255.0 blue:0\/255.0 alpha:1] CGColor]);\n\n\nCGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();\n\n\nCGContextRef context = CGBitmapContextCreate(NULL, frame.size.width, frame.size.height, 8, 4 * frame.size.width, colorSpace, kCGImageAlphaPremultipliedFirst);\n\nCGContextSetTextMatrix(context, CGAffineTransformIdentity);\n\nCGContextSelectFont(context, fontName, 18, kCGEncodingMacRoman);\n\nCGContextSetRGBStrokeColor(context, ringColorComponents[0], ringColorComponents[1], ringColorComponents[2], 1.0);\nCGContextSetLineWidth(context, 25);\n\n\nCGContextStrokeEllipseInRect(context, CGRectMake(10, 10, frame.size.width - (10 * 2), frame.size.height - (10 * 2)));\n\nCGContextSetRGBFillColor(context, textColorComponents[0], textColorComponents[1], textColorComponents[2], 1.0);\n\n\n\nCGContextSaveGState(context);\nCGContextTranslateCTM(context, centerPoint.x, centerPoint.y);\n\n\/\/    float angleStep = 2 * M_PI ;\nfloat angle = DegreesToRadians(135);\n\nfloat textRadius = 95;\n\ntextRadius = textRadius - 12;\n\n\/\/ [self drawImageAtContext:context string:text atAngle:angle withRadius:textRadius];\n[self drawLblBackGroundAtContext:context string:sectionTitle atAngle:angle withRadius:textRadius withLabelBackgroudColor:labelBgColor  ];\n\/\/angle -= angleStep;\n\n\nCGContextSetRGBStrokeColor(context, ringColorComponents[0], ringColorComponents[1], ringColorComponents[2], 1.0);\nCGContextSetLineWidth(context, 25);\n\n\n[self drawStringAtContext:context string:sectionTitle atAngle:angle withRadius:textRadius];\n\/\/angle -= angleStep;\n\nangle = DegreesToRadians(315);\n\/\/ [self drawImageAtContext:context string:text atAngle:angle withRadius:textRadius];\n[self drawImageAtContext:context atAngle:angle withRadius:textRadius levelUnlock:  levelUnloackNm];\n\/\/angle -= angleStep;\n\nCGContextRestoreGState(context);\n\nCGImageRef contextImage = CGBitmapContextCreateImage(context);\n\n\nCGContextRelease(context);\nCGColorSpaceRelease(colorSpace);\n\n\/\/[self saveImage:[UIImage imageWithCGImage:contextImage] withName:@\"test.png\"];\nreturn [UIImage imageWithCGImage:contextImage];\n\n}\n- (void) drawImageAtContext:(CGContextRef) context atAngle:(float) angle withRadius:(float) radius levelUnlock:(NSInteger )levelUnlock\n{\nCGSize textSize =  [@\"MMMMMM\" sizeWithAttributes:@{NSFontAttributeName: [UIFont fontWithName:@\"Helvetica\" size:18]}];\nfloat perimeter = 2 * M_PI * radius;\nfloat textAngle = (textSize.width+1) \/ perimeter * 2 * M_PI;\n\nangle += textAngle \/ 2;\n\n\/\/    UIImageView *image = [[UIImageView alloc]initWithFrame:CGRectMake(angle, 0, 20, 20)];\nif (levelUnlock != 0) {\n    for (int index = 0; index &lt; 6; index++)\n    {\n        NSRange range = {index, 1};\n        NSString* letter = [@\"MMMMMM\" substringWithRange:range];\n        CGSize charSize = [letter sizeWithAttributes:@{NSFontAttributeName: [UIFont fontWithName:@\"Helvetica\" size:18]}];\n\n        NSLog(@\"Char %@ with size: %f x %f\", letter, charSize.width, charSize.height);\n\n        float x = radius * cos(angle);\n        float y = radius * sin(angle);\n\n        float letterAngle = ((charSize.width+1) \/ perimeter * -2 * M_PI);\n\n\n        CGContextSaveGState(context);\n        CGContextTranslateCTM(context, x, y);\n        CGContextRotateCTM(context, (angle - 0.5 * M_PI));\n        \/\/ CGContextShowTextAtPoint(context, 0, 0, c, strlen(c));\n        const CGFloat* ringColorComponents;\n        NSInteger raiting = 6 - levelUnlock ;\n        if (index + 1 &gt; raiting) {\n            ringColorComponents = CGColorGetComponents([[UIColor colorWithRed:0\/255.0 green:170\/255.0 blue:216\/255.0 alpha:1] CGColor]);\n        }else{\n            ringColorComponents =  CGColorGetComponents([[UIColor colorWithRed:150\/255.0 green:150\/255.0 blue:150\/255.0 alpha:1] CGColor]);\n        }\n\n        CGContextSetRGBStrokeColor(context, ringColorComponents[0], ringColorComponents[1], ringColorComponents[2], 1.0);\n        CGContextSetRGBFillColor(context, ringColorComponents[0], ringColorComponents[1], ringColorComponents[2], 1.0);\n        CGContextSetLineWidth(context, 8);\n\n      \/\/Line Changed for border \n        CGContextStrokeEllipseInRect(context, CGRectMake(2, 1, 8, 8));\n\n        CGContextRestoreGState(context);\n\n        angle += letterAngle;\n    }\n }\n\n\n }\n- (void) drawLblBackGroundAtContext:(CGContextRef) context string:(NSString*) text atAngle:(float) angle withRadius:(float) radius  withLabelBackgroudColor: (UIColor *)labelBgColor\n{\n\/\/ text = [NSString stringWithFormat:@\"%@sdsad\",text];\nCGSize textSize =  [text sizeWithAttributes:@{NSFontAttributeName: [UIFont fontWithName:@\"Helvetica\" size:20]}];\/\/[text sizeWithFont:[UIFont fontWithName:@\"Helvetica\" size:20]];\n\nfloat perimeter = 2 * M_PI * radius;\nfloat textAngle = textSize.width \/ perimeter * 2 * M_PI;\n\nangle += textAngle \/ 2;\n\nfor (int index = 0; index &lt; [text length]; index++)\n{\n    NSRange range = {index, 1};\n    NSString* letter = [text substringWithRange:range];\n    \/\/        char* c = (char*)[letter cStringUsingEncoding:NSASCIIStringEncoding];\n    CGSize charSize = [letter sizeWithAttributes:@{NSFontAttributeName: [UIFont fontWithName:@\"Helvetica\" size:18]}];\n\n    NSLog(@\"Char %@ with size: %f x %f\", letter, charSize.width, charSize.height);\n\n    float x = radius * cos(angle);\n    float y = radius * sin(angle);\n\n    float letterAngle = ((charSize.width+1) \/ perimeter * -2 * M_PI);\n\n\n    CGContextSaveGState(context);\n    CGContextTranslateCTM(context, x, y);\n    CGContextRotateCTM(context, (angle - 0.5 * M_PI));\n\n    const CGFloat* ringColorComponents = CGColorGetComponents([ labelBgColor CGColor]);\n\n    CGContextSetRGBStrokeColor(context, ringColorComponents[0], ringColorComponents[1], ringColorComponents[2], 1.0);\n    CGContextSetRGBFillColor(context, ringColorComponents[0], ringColorComponents[1], ringColorComponents[2], 1.0);\n\n    if (index + 1 == [text length]){\n        CGContextSetLineWidth(context, 15);\n        CGContextStrokeRect(context, CGRectMake(0, 2, 15, 15));\n    }else{\n        CGContextSetLineWidth(context, 15);\n        CGContextStrokeRect(context, CGRectMake(0, 2, 15, 15));\n    }\n\n    CGContextRestoreGState(context);\n    if (index +1 == [text length]) {\n        angle += letterAngle  ;\n    }else{\n        angle += letterAngle;\n    }\n\n}\n\n}\n\n\n@end\n<\/code><\/pre>\n<p>Try this code its working fine &#8230; <\/p>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\"><\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved How to make UI with round image and round text, also add ratting icon on same circle. in iOS application <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Import roundImageView.h class in your view class and set background image on your UIButton. Please change button type Custom. After Following these steps try this code . CGRect frame = CGRectMake(0, 0, 200, 200); roundImageView *roudImage = [[roundImageView alloc]init]; UIImage *image1 = [roudImage createMenuRingWithFrame:frame :@&#8221;Your Title&#8221; labelBgColor:[UIColor colorWithRed:(191\/255.f) green:(251\/255.f) blue:(158\/255.f) alpha:1] ringBgColor:[UIColor colorWithRed:(214\/255.f) green:(214\/255.f) &#8230; <a title=\"[Solved] How to make UI with round image and round text, also add ratting icon on same circle. in iOS application\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/\" aria-label=\"More on [Solved] How to make UI with round image and round text, also add ratting icon on same circle. in iOS application\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[471,1358,2327,469,4623],"class_list":["post-19434","post","type-post","status-publish","format-standard","hentry","category-solved","tag-ios","tag-ios5","tag-ios7","tag-iphone","tag-ui-design"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Solved] How to make UI with round image and round text, also add ratting icon on same circle. in iOS application - JassWeb<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] How to make UI with round image and round text, also add ratting icon on same circle. in iOS application - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] Import roundImageView.h class in your view class and set background image on your UIButton. Please change button type Custom. After Following these steps try this code . CGRect frame = CGRectMake(0, 0, 200, 200); roundImageView *roudImage = [[roundImageView alloc]init]; UIImage *image1 = [roudImage createMenuRingWithFrame:frame :@&quot;Your Title&quot; labelBgColor:[UIColor colorWithRed:(191\/255.f) green:(251\/255.f) blue:(158\/255.f) alpha:1] ringBgColor:[UIColor colorWithRed:(214\/255.f) green:(214\/255.f) ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-06T12:04:52+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] How to make UI with round image and round text, also add ratting icon on same circle. in iOS application\",\"datePublished\":\"2022-11-06T12:04:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/\"},\"wordCount\":112,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"ios\",\"ios5\",\"ios7\",\"iphone\",\"ui-design\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/\",\"name\":\"[Solved] How to make UI with round image and round text, also add ratting icon on same circle. in iOS application - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2022-11-06T12:04:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] How to make UI with round image and round text, also add ratting icon on same circle. in iOS application\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jassweb.com\/solved\/#website\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jassweb.com\/solved\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"contentUrl\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] How to make UI with round image and round text, also add ratting icon on same circle. in iOS application - JassWeb","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:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] How to make UI with round image and round text, also add ratting icon on same circle. in iOS application - JassWeb","og_description":"[ad_1] Import roundImageView.h class in your view class and set background image on your UIButton. Please change button type Custom. After Following these steps try this code . CGRect frame = CGRectMake(0, 0, 200, 200); roundImageView *roudImage = [[roundImageView alloc]init]; UIImage *image1 = [roudImage createMenuRingWithFrame:frame :@\"Your Title\" labelBgColor:[UIColor colorWithRed:(191\/255.f) green:(251\/255.f) blue:(158\/255.f) alpha:1] ringBgColor:[UIColor colorWithRed:(214\/255.f) green:(214\/255.f) ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/","og_site_name":"JassWeb","article_published_time":"2022-11-06T12:04:52+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] How to make UI with round image and round text, also add ratting icon on same circle. in iOS application","datePublished":"2022-11-06T12:04:52+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/"},"wordCount":112,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["ios","ios5","ios7","iphone","ui-design"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/","url":"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/","name":"[Solved] How to make UI with round image and round text, also add ratting icon on same circle. in iOS application - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2022-11-06T12:04:52+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-ui-with-round-image-and-round-text-also-add-ratting-icon-on-same-circle-in-ios-application\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] How to make UI with round image and round text, also add ratting icon on same circle. in iOS application"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/19434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=19434"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/19434\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=19434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=19434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=19434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}