腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
以
编程
方式
将
操作
addTarget
到
UIButton
、
、
下面是我的代码: super.viewDidLoad() button.
addTarget
(self, action: #selector(ViewController.buttonTapped(_:)), for: .touchUpInside) } func buttonTapped(_ sender: <e
浏览 2
提问于2016-09-07
得票数 4
5
回答
在Swift中可以重写
UIButton
的
操作
方法吗?
、
、
我有一个
UIButton
。我希望使用相同的
UIButton
来执行多个
操作
。首先,我
以
编程
方式
将
操作
设置为一个按钮。button1.
addTarget
(self, action: #selector(ViewController.function1), forControlEvents: .TouchUpInside) 接下来,我想放弃该功能,并添加其他
操作
。button1.
addTarget
(sel
浏览 4
提问于2016-07-04
得票数 10
回答已采纳
1
回答
TableView自定义单元格
UIButton
操作
现在我想在这些动作中给出一些动作,谁能帮我在我的
UIButton
中如何使用动作?IBAction)btnAction;-(IBAction)btnAction [self Evaluate:(int *)1 :(int *)2]; 现在告诉我如何在
UIButton
我的单元格中有
UIButton
。
浏览 0
提问于2011-04-18
得票数 0
回答已采纳
6
回答
以
编程
方式
创建的
UIButton
。如何
将
touch up发送到IBAction?
、
、
我有一个
以
编程
方式
创建的
UIButton
。我如何让这个
UIButton
向我拥有的IBAction发送它的touch up事件?
浏览 0
提问于2011-03-12
得票数 15
2
回答
UIButton
不响应“touchUpInside”,但
将
响应“touchDown”fine
、
、
、
、
在我的程序中,我
以
编程
方式
将
UIButton
声明为UIVIewController的属性。我已经将其设置为在用户触发touchUpInside事件时发送
操作
,如下所示: [restartButton
addTarget
:self action:@selector(handleRestart)forControlEvents:UIControlEventTouchUpInside];,其中restartButton是
UIButton
的名称。
浏览 21
提问于2012-06-10
得票数 3
回答已采纳
1
回答
UIButton
在UIScrollView的不可见区域
、
、
我如何才能得到一个按钮点击按钮,它位于一个UIScrollView,但在其最初不可见的区域?问题是,内容在非剪裁视图中是可见的,因此不会被触及。
浏览 3
提问于2011-05-15
得票数 0
3
回答
NSMutableArray UIButtons
操作
?
、
、
、
、
我
以
编程
方式
创建UIButtons,然后
将
这些UIButtons存储在NSMutableArray中。所有这些UIButtons都有一些文本作为标题。我没有这些UIButtons的插座。现在,当我触摸或单击某个
UIButton
时,我想将UIlabel的标题分配给
UIButton
。但对我来说,问题是:我如何在这些UIButtons上执行函数。因为我
以
编程
方式
创建了UIButtons,而且这些UIButtons没有出口。[[NSMutab
浏览 2
提问于2012-05-17
得票数 0
回答已采纳
3
回答
iOS-
UIButton
自定义目标
、
、
、
我
以
编程
方式
添加
UIButton
(self.button是我的属性
UIButton
):[self.button
addTarget
:self action:@selector(buttonPressed:completion:) forControlEvents:UIControlEventTouchUpInsid
浏览 2
提问于2014-05-04
得票数 0
回答已采纳
2
回答
在IOS 4.2中不能使用
UIButton
addTarget
方法
、
、
、
我有一个
以
编程
方式
制作的
UIButton
,我想为该按钮添加目标和
操作
。我有使用方法
addTarget
: action: forControlEvents:
UIButton
*moreButton =[[[
UIButton
alloc] init] autorelease]; float version = [[[UIDevice currentDevice] systemVers
浏览 4
提问于2010-12-24
得票数 0
回答已采纳
1
回答
如何在
UIButton
中创建ViewController事件?
、
、
我
以
编程
方式
添加一个
UIButton
,我想在按它时调用一个方法,我不知道如何设计这样的模式: 我应该
将
事件处理程序或
操作
方法放在哪里?在视图控制器或视图本身。如果我将该方法放在视图控制器中,如何在该方法中
操作
视图的SubViews?我应该公开所有的SubViews (
UIButton
等)吗?通过将它们放入视图的头文件作为属性来控制?实际上,这个问题应该以这样的
方式
提出:如何通过接口生成器
将
视图中的SubViews
浏览 1
提问于2015-12-13
得票数 9
回答已采纳
3
回答
TableView CustomCell
UIButton
问题
、
、
我正在为我的tableView.The customCell Contains
UIButton
.And使用CustomCell,我想使用此按钮分配一个
操作
。BeginingCell.h
将
UIButton
的下降保持为:@interface BeginingCell : UITableViewCell {IBOutlet
UIButton
*ansBtn1; @property(nonatomic,retain)IBOutlet
浏览 3
提问于2011-04-18
得票数 1
回答已采纳
1
回答
将
UIButton
的目标设置为IBAction不工作(Objective-C)
、
、
以下
以
编程
方式
将
UIButton
的目标设置为IBAction的代码不能工作,有什么原因吗?.h.m[google
addTarget
:self action:@selector(googleIt:) forC
浏览 1
提问于2013-05-18
得票数 0
回答已采纳
1
回答
在
UIButton
定义处“隐藏实例变量”警告
、
、
我正在
以
编程
方式
将
UIButton
添加到datePicker中: CGRect todayButtonFrame = CGRectMake(180.0, 200.0,40.0, 40.0); [todayButtonDatePicker
ad
浏览 0
提问于2014-02-16
得票数 1
回答已采纳
2
回答
如何以
编程
方式
为CallBacks设置
UIButton
?
、
人工建造:{ [objectName
a
浏览 5
提问于2012-06-24
得票数 0
回答已采纳
2
回答
无法
以
编程
方式
设置
UIButton
操作
、
、
我的UIButtons上的
操作
有点问题。我
以
编程
方式
创建了4个按钮,但无法触发TouchUpInside事件。
UIButton
*btn; btn = [
UIButton
buttonWithType:UIB
浏览 0
提问于2013-05-09
得票数 0
回答已采纳
2
回答
在没有@objc引用的情况下向
UIButton
添加目标
、
当我们
以
编程
方式
创建
UIButton
并为其单击
操作
添加目标时。对于选择器,我们需要一个带有"@objc“引用的函数,即使我们在一个纯粹的swift项目中工作。override func viewDidLoad() { self.view.addSubview(requiredButton)
浏览 1
提问于2020-09-03
得票数 0
2
回答
以
编程
的
方式
快速添加按钮
、
、
、
我试图
以
编程
方式
添加按钮,创建了按钮,它在应用程序中显示,但问题是,当我用.
addTarget
编写#selector时会出现错误(它成功构建,但
操作
不起作用),我试图编写playAction()、playActionplayPauseButton.
addTarget
(self, action: #selector(playAction(sender:)), for: .touchUpInside) funcplayAction(sender:
UIButton</e
浏览 12
提问于2020-06-04
得票数 0
回答已采纳
2
回答
使用选择器
操作
向UIView添加多个UIButtons
、
、
、
、
我已经
以
编程
方式
向UIView添加了一些按钮(通过addSubview)。我已经为这个按钮添加了一个带有函数的@选择器。但是,它们会出现在视图中,但当我单击时,最后一个按钮只起作用。进入我的.h:进入我的.mmyButton.
浏览 2
提问于2018-02-23
得票数 0
2
回答
Swift4
addTarget
at
UIButton
不工作于UIView
、
、
、
我
以
编程
的
方式
创建了一个
UIButton
并将它添加到一个子视图中。不过,
AddTarget
并不在那里工作。只有当我
将
按钮添加到主视图中时,
AddTarget
才能工作。class ViewController: UIViewController { @objc func TestPressed(sender:
UIButton
func ButtonCreate () { let button
浏览 0
提问于2018-03-30
得票数 0
回答已采纳
1
回答
以
编程
方式
"swift“执行segue
我
以
编程
方式
在按钮中添加了"
addTarget
“属性,
以
转到另一个视图控制器,但它不起作用。login.
addTarget
(self, action: Selector(("toHome")), for: UIControl.Event.touchUpInside) @objc func toHome(_ sender :
UIButton
!)
浏览 0
提问于2019-06-09
得票数 0
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
云直播
即时通信 IM
实时音视频
活动推荐
运营活动
广告
关闭
领券