objective c - Insert UNICODE HAIRSPACE character into NSString -


i'm trying add unicode character nsstring in ways:

nsstring *euformatted = [nsstring stringwithformat:@"\u200a%@",self.eu]; 

or

unichar hairspacechar = 0x200a; // hairspace symbol nsstring* hairspace = [[nsstring alloc] initwithcharacters:&hairspacechar length:1]; nsstring *euformatted = [nsstring stringwithformat:@"%@%@",hairspace,self.eu]; 

but not results ... try find solution making me crazy since 3 days.

i have try set font of uilabel show string that:

bigfont = [uifont fontwithname:@"helvetica" size:10.0f]; 

but no way, hairspace not supported.

here screenshot if see, hairspace suppose after number 10 , before '°' character.

enter image description here

if try

nslog(@"%@", [nsstring stringwithformat:@"-\u200a-"]); 

i '- -'.

second example not work.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -