CGSize expectedTypeLabelSize = [DealTypeSTR sizeWithFont:[UIFont fontWithName:@"Aileron-Bold" size:15]
constrainedToSize:DealType_label.frame.size
lineBreakMode:DealType_label.lineBreakMode];
答案 0 :(得分:2)
您可以尝试
void Tree::inorder(Knote* node)
{
if (node != nullptr)
{
inorder(node->left);
cout << node->item << " ";
inorder(node->right);
}
}
class Node {
public:
Node(int data = 0);
bool red;
int item;
Node *left;
Node *right;
Node *parent;
};
答案 1 :(得分:0)
你可以试试这个 -
CGSize expectedTypeLabelSize = [DealTypeSTR boundingRectWithSize:size
options:NSStringDrawingUsesLineFragmentOrigin
attributes:@{NSFontAttributeName:[UIFont fontWithName:@"Aileron-Bold" size:15]}
context:nil];