换行模式在ios7中不起作用

时间:2015-05-21 08:02:09

标签: ios objective-c ios7

CGSize expectedTypeLabelSize = [DealTypeSTR sizeWithFont:[UIFont fontWithName:@"Aileron-Bold" size:15] 
constrainedToSize:DealType_label.frame.size 
lineBreakMode:DealType_label.lineBreakMode];

2 个答案:

答案 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];