到目前为止我的发送按钮有这个代码:
NSString* urlString = [NSString stringWithFormat:@"http://server.com/ios/add.php?user=iPhone+App&message=%@", messageBox.text stringByAddingPercentEscapesUsingEncoding : NSUFT8StringEncoding];
NSURL *add = [NSURL URLWithString:urlString];
Run Code Online (Sandbox Code Playgroud)
但是我确实收到错误"预期":'
我正在尝试使用Clancey FlyoutNavigation,但是我无法让它执行一个segue.
我希望它像导航菜单一样工作,所以如果我按下"开始"它会转到我的故事板上的某个视图
这是我目前的代码,但它根本不起作用.
var navigation = new FlyoutNavigationController {
// Create the navigation menu
NavigationRoot = new RootElement ("Navigation") {
new Section ("Pages") {
new StringElement ("Start"),
}
},
// Supply view controllers corresponding to menu items:
ViewControllers = new [] {
new UIViewController { this.PerformSegue("toError", this) },
},
};
// Show the navigation view
navigation.ToggleMenu ();
View.AddSubview (navigation.View);
Run Code Online (Sandbox Code Playgroud) 我试图在某个视图上隐藏我的导航控制器的后退按钮(使用故事板)
我试图隐藏栏后退按钮覆盖ViewWillAppear,但似乎没有发生.
这是代码:
public override void ViewWillAppear (bool animated)
{
base.ViewWillAppear (animated);
this.NavigationController.NavigationItem.SetHidesBackButton (true, true);
}
Run Code Online (Sandbox Code Playgroud) 将我的更新发送到App Store后,应用程序在从App Store下载时崩溃,但是通过Xamarin Studio进行的调试工作正常.
但是现在当我尝试在我的设备上发布/调试时,它会开始崩溃,从而出现此错误:
2013-05-21 10:20:30.933 nytLectio[10969:c07] Could not register the assembly 'MBProgressHUD': MonoTouch.MonoTouchException: Cannot register two managed types ('MBProgressHUD.MTMBProgressHUD' and 'AlexTouch.MBProgressHUD.MBProgressHUD') with the same native name ('MBProgressHUD').
at MonoTouch.Registrar.Registrar.RegisterType (System.Type type, System.Collections.Generic.List`1 exceptions) [0x00000] in <filename unknown>:0
at MonoTouch.Registrar.Registrar.RegisterAssembly (System.Reflection.Assembly assembly) [0x00000] in <filename unknown>:0
Run Code Online (Sandbox Code Playgroud)
我认为这会导致崩溃,但我不知道如何解决它,它让我感到困惑,因为它在模拟器中与调试和发布一起工作,但在我的设备上却没有.
不知何故,我在尝试更新我的sql db中的记录时遇到了我的sql错误
这是我目前的代码
HTML格式:
<html>
<head>
<title>title here</title>
</head>
<body>
<form action="end.php" method="POST">
<input type="text" id="comment" name="comment" placeholder="Kommentar"><p>
<input type="submit" value="Stop arbejde">
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
end.php
<?php
$host="localhost";
$username="root";
$password="password";
$db_name="db";
$tbl_name="log";
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$comment=$_POST['comment'];
$datetime=date("y/m/d H:i:s");
$editit=date("W/D");
$sql="UPDATE log SET end=$datetime, comment=$comment WHERE editid='$editit'";
$result=mysql_query($sql);
if($result){
echo "Successful<BR>";
}
else {
echo "Fejl";
}
mysql_close();
?>
Run Code Online (Sandbox Code Playgroud)
自从我收到错误"Fejl"后,我做错了什么?
ios ×4
c# ×3
xamarin ×2
xamarin.ios ×2
crash ×1
html ×1
nsstring ×1
objective-c ×1
php ×1
sql ×1