ios - Custom UIButton in UIscrollview -


I'm using xcode 4.6 to develop an app. Here I want to add UIButton to the program from UIScrollView. This is my follow-up code.

  UIButton * bt = [[UIButton alloc] initWithFrame: frame]; BT = [UI Button Button Type: UIButtonTypeCustom]; [BT SETITAL: @ "custom button" forState: UIControlStateNormal]; [BT EditedGrase: Action by itself: @Sillector (UserNlink) Control events: UICTLEVENT TouchUp Inside]; Bt.backgroundColor = [UIColor grayColor]; Bt.titleLabel.textColor = [UIColor blue color]; [Self. MensCallViewAidSubewEview: BT]; [Self. MensCalViewview LaosViewTrofront: BT];   

The problem now is that the button gets clicked (technically its text colors are white) I checked the UIScrollView color in red, which is still the same button Was in the scene, but I can not tell the reason why the color of its text has changed and how can I cancel it. In fact, I use the UIbutton to create a clickable link, I want to see the uttexviewview (Detadetekterip know), but I have no use because I wanted to show different text label links and actual link.

Note: The text color does not change to blue and is only white

Try the code below

  UIButton * bt = [UIButton with button type: UIButtonTypeCustom]; Bt.frame = CGRectMake (50.0, 50.0, 100.0, 50.0); [BT SETITAL: @ "custom button" forState: UIControlStateNormal]; [BT EditedGrase: Action by itself: @Sillector (UserNlink) Control events: UICTLEVENT TouchUp Inside]; Bt.backgroundColor = [UIColor grayColor]; Bt.titleLabel.textColor = [UIColor blue color]; [Add Self-Component Add] - (Zero) UserTapOnline: (UIButton *) Sender {NSLog (@ "Test .."); [Self display selector: @Selector (changeBtnTextColor :) withObject: sender afterDelay: 1.0]; } - (zero) changeBtnTextColor: (UIButton *) BTN {btn.titleLabel.textColor = [UIColor blueColor]; }   

Hope this will work for you.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -