I have no clue how to start , so I also do not have any code. My research so far pointed out, that there is no standard functionality and this has to be coded by our self ?
any hint or confirmation ?
Update using CoreTextArcView, which was suggested by Ashish.
Thanks for helping. The sample Project which was suggested works for me. I can see the blue circle with text on it. But with integrating this into my project, I have problems. I did the following
I added the Files
"CoreTextArcView.h"
and"CoreTextArcView.m"
into my Project. I can see them in the explorer to the left.In my BridgingHeader.h I added to import :
#import "CoreTextArcView.h"
I added the Codesample :
var arctext : CoreTextArcView = CoreTextArcView(frame: CGRectMake(50, 50, 200, 200), font: UIFont.systemFontOfSize(15), text: "Hello this is radious arc with text", radius: 85, arcSize: 130.0, color: UIColor.redColor()) arctext.backgroundColor = UIColor.clearColor() self.view.addSubview(arctext)
-> I get compile errors in CoreTextArcView.m
:
/Users/user/Desktop/Prototypes/CoreTextArcView.m
/Users/user/Desktop/Prototypes/CoreTextArcView.m:99:14: 'release' is unavailable: not available in automatic reference counting mode
/Users/user/Desktop/Prototypes/CoreTextArcView.m:99:14: ARC forbids explicit message send of 'release'
/Users/user/Desktop/Prototypes/CoreTextArcView.m:100:21: 'retain' is unavailable: not available in automatic reference counting mode
/Users/user/Desktop/Prototypes/CoreTextArcView.m:100:21: ARC forbids explicit message send of 'retain'
/Users/user/Desktop/Prototypes/CoreTextArcView.m:144:33: Cast of Objective-C pointer type 'NSAttributedString *' to C pointer type 'CFAttributedStringRef' (aka 'const struct __CFAttributedString *') requires a bridged cast
/Users/user/Desktop/Prototypes/CoreTextArcView.m:190:63: Cast of C pointer type 'CTFontRef' (aka 'const struct __CTFont *') to Objective-C pointer type 'UIFont *' requires a bridged cast
/Users/user/Desktop/Prototypes/CoreTextArcView.m:298:37: Cast of C pointer type 'CTFontRef' (aka 'const struct __CTFont *') to Objective-C pointer type 'id' requires a bridged cast
/Users/user/Desktop/Prototypes/CoreTextArcView.m:307:24: 'autorelease' is unavailable: not available in automatic reference counting mode
/Users/user/Desktop/Prototypes/CoreTextArcView.m:307:24: ARC forbids explicit message send of 'autorelease'
any help ?