28 
 
        
      
      Làm thế nào để bạn thêm văn bản nhiều dòng vào một UIButton?
      
  Tôi có đoạn mã sau ... UILabel *buttonLabel = [[UILabel alloc] initWithFrame:targetButton.bounds]; buttonLabel.text = @"Long text string"; [targetButton addSubview:buttonLabel]; [targetButton bringSubviewToFront:buttonLabel]; ... Ý tưởng là tôi có thể có văn bản nhiều dòng cho nút, nhưng văn bản luôn bị che khuất bởi hình nền của UIButton. Một cuộc gọi …
      
        
          
                   368
                
        
        
          
                  
                    ios 
                  
                    cocoa-touch 
                  
                    uibutton 
                  
                    uikit