c# iphone 开发 MonoDevelop viewController的
打开monoDevelop,选择Start a New Solution
选择iphone Window-based Project 项目名为firstViewController 确定
再按确定,系统自动建下面文件,
main.cs 内容
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace FirstViewController
{
public class Application
{
static void Main (string[] args)
{
UIApplication.Main (args);
}
}
// The name AppDelegate is referenced in the MainWindow.xib file.
public partial class AppDelegate : UIApplicationDelegate
{
// This method is invoked when the application has loaded its UI and its ready to run
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// If you have defined a view, add it here:
// window.AddSubview (navigationController.View);
window.MakeKeyAndVisible ();
return true;
}
// This method is required in iPhoneOS 3.0
public override void OnActivated (UIApplication application)
{
}
}
}
这里重写的FinishedLaunching 方法,如果FinishedLaunching 方法不在10S内返回,那么iso就会关闭该应用程序!在这里不给添加太多的代码!
添加iPhone View with Controller ,在file->new->file 选择iPhone and iPad ->iPhone View with Controller
输入first,,按确定
展开Solution 里的first.xib
<相关新闻>>
- 发表评论
-
- 最新评论 更多>>