简体   繁体   中英

can't control-drag UIButton to IBOutletCollection

I control-drag one UIButton created a IBOutletColleciton and then control-drag the second UIButton to the same IBOutletColleciton . But there is only insert... option. I can't connect the second UIButton with the IBOutletColleciton .

Could anybody tell me why? Thanks!

Create 'outlet connection' when control drag

在此处输入图片说明

then you will see

在此处输入图片说明

now you can connect both buttons to the same connection (drag your button to the label of outlet) works on both obj-c/swift

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM