Layout\" from \"Left to Right\" or \"Right to Left\"." />
开发者

Change direction of disclosure triangle

开发者 https://www.devze.com 2023-04-08 16:02 出处:网络
How can I change the direction of the disclosure triangle programmatically? In Interface Builder it\'s possible by changing the value \"Control -> Layout\" from \"Left to Right\" or \"Right to Left\".

How can I change the direction of the disclosure triangle programmatically? In Interface Builder it's possible by changing the value "Control -> Layout" from "Left to Right" or "Right to Left".

I made a diff of a NIB file. The only开发者_Go百科 change was NSCellFlags2.

Is this documented anywhere?


The method you’re looking for is -[NSCell setUserInterfaceLayoutDirection:]. You need to obtain a reference to the corresponding cell and then send it the appropriate message. For example, considering disclosureButton points to that disclosure button:

[[disclosureButton cell] setUserInterfaceLayoutDirection:NSUserInterfaceLayoutDirectionRightToLeft];
0

精彩评论

暂无评论...
验证码 换一张
取 消