我在故事板中添加了一个按钮:

我创建了一个发送事件和引用插座:

这是我的 .h 文件中的代码:
@interface LHCompletionVC : UIViewController<SGridDelegate, UIPopoverControllerDelegate,UIPickerViewDelegate,
UIPickerViewDataSource,UIAlertViewDelegate>
{
IBOutlet UIButton *areaButton;
IBOutlet UIButton *unitButton;
IBOutlet UIView *searchView;
__weak IBOutlet UILabel *userLabel;
IBOutlet UIButton *testBtn;
}
Run Code Online (Sandbox Code Playgroud)
这是我的 .m 文件中的代码:
- (void)CustomAlert:(NSString*)reason
{
UIAlertView *customAlert = [[UIAlertView alloc]initWithTitle:@"Message" message:reason delegate:nil cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
[customAlert show];
}
- (IBAction)testBtnPressed:(UIButton *)sender
{
[self CustomAlert:@"Testing"];
return;
}
Run Code Online (Sandbox Code Playgroud)
但是当我运行我的代码时,我没有收到任何错误,并且我在 testBtnPressed 上设置了一个断点,当我单击我的按钮时,没有任何反应,没有断点,没有错误,也没有警报。奇怪...有人知道为什么这不起作用吗?

我有一个删除按钮,如下所示:
<a class="btn btn-default" href="Communities.php?action=delete&id=' . $value['rb_communityId'] . '" onclick="javascript:confirm(\'Are you sure you want to delete this item?\');">Delete</a>
Run Code Online (Sandbox Code Playgroud)
如果用户在我的确认回来时点击取消,那么我不希望发生任何事情,如果用户点击取消它会离开它将返回false.
我试图使用文件输入来上传一个3.5MB的文件,但是当我尝试上传它时,我得到一个$ _FILES ['error'] == 2,我相信这告诉我文件太大了.
我该怎么做才能上传这个?
这是我的一些代码:
<input type="hidden" name="MAX_FILE_SIZE" value="100000000000000000000000000000000000000000000000000000000000000">
<input type="file" id="home_pdf" name="home_pdf">
Run Code Online (Sandbox Code Playgroud)
我的php设置如下:
post_max_size = 128M
memory_limit = 128M
max_file_uploads = 20
max_execution_time = 30
upload_max_filesize = 128M
Run Code Online (Sandbox Code Playgroud) 我有这个条件:
if($_SERVER['REQUEST_URI'] != '/page.php' || ($_SERVER['REQUEST_URI'] != '/' && $_SERVER['REQUEST_URI'] != '/index.php')){
//do something, but not on index or page . php
}
Run Code Online (Sandbox Code Playgroud)
它适用于索引页面,但不适用于page.php ...我做错了什么?
php ×2
confirm ×1
file-upload ×1
if-statement ×1
ios7 ×1
javascript ×1
objective-c ×1
xcode ×1