ฉันอยู่ที่นี่มานานกว่าหนึ่งวันแล้ว และฉันก็กำลังถอนผมที่นี่ ฉันกำลังพยายามนำตัวอย่าง RedLaser ไปใช้กับแอปของฉันเอง แต่ MonoDevelop/MonoTouch ไม่ได้สร้างโค้ดที่ถูกต้อง จะต้องเป็นสิ่งที่ฉัน (ไม่) ทำใน Interface Builder โอเค เอาล่ะ
ในตัวอย่างใน 'RLSampleViewController.xib.designer.cs สิ่งต่อไปนี้จะถูกสร้างขึ้น:
namespace RedLaserSample {
// Base type probably should be MonoTouch.UIKit.UIViewController or subclass
[MonoTouch.Foundation.Register("RLSampleViewController")]
public partial class RLSampleViewController {
private OverlayController __mt_overlayController;
....
[MonoTouch.Foundation.Connect("overlayController")]
private OverlayController overlayController {
get {
this.__mt_overlayController = ((OverlayController)(this.GetNativeField("overlayController")));
return this.__mt_overlayController;
}
set {
this.__mt_overlayController = value;
this.SetNativeField("overlayController", value);
}
}
ในรหัสของฉันมีการสร้างสิ่งต่อไปนี้:
namespace Winkel
{
[Register ("ScanArtikelController")]
partial class ScanArtikelController
{
[Outlet]
Winkel.OverlayController overlayController { get; set; }
ดังนั้นจึงไม่มีการสร้างไวยากรณ์ 'เชื่อมต่อ' และฉันไม่รู้ว่าจะกำหนดสิ่งนี้อย่างถูกต้องในตัวสร้างอินเทอร์เฟซได้อย่างไร
มีอย่างอื่นที่ฉันสังเกตเห็น จะต้องมีตัวสร้างอื่นที่ใช้งานอยู่ในรหัสของฉัน นี่คือสิ่งที่ถูกสร้างขึ้นสำหรับตัวอย่าง RedLaser:
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
และความคิดเห็นนี้ถูกสร้างขึ้นสำหรับรหัสของฉัน:
// WARNING
//
// This file has been generated automatically by MonoDevelop to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//