objective c - Find the optimal size for UILabel within UIBezierPath (for a pie chart) -


i desperately trying dynamically find optimal size draw uilabel within pie chart (see outline below).

the label center should in middle of each piece of pie, determined cgpoint @ 1/2 radius , 1/2 pie piece (= startangle+(endangle-startangle)/2).

now problem is, neither width nor height of uilabel known. width depends on label's center position (e.g. if pie piece upper half circle, width widest). label lines "unlimited" (label.numberoflines = 0) , label.text user defined ("description" of pie value). fontsize range between minimum (6.0f) , maximum (14.0f) defined.

i thought of using uitextview pie piece's uibezierpath exclusionpath, centering , resizing uifontsize won't work - @ least didn't find way it.

any hint on how resolve issue appreciated :)

pie chart


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -