1

我对 iPhone 开发人员真的很陌生。

我正在评估是否将 Monotouch 或 objC 用于潜在的应用程序。

该应用程序需要能够将图片打印到网络打印机。

我看过几篇关于如何使用 cocoa touch/objc 的帖子。

找不到任何使用单点触控的示例。

这是否可行/支持使用 MonoTouch?

这是一个必须具备的功能。

谢谢

4

1 回答 1

1

这应该这样做,我已经检查了这个:

http://github.com/migueldeicaza/monotouch-samples在“打印”目录中:

void Print ()
{
    var printInfo = UIPrintInfo.PrintInfo;
    printInfo.OutputType = UIPrintInfoOutputType.General;
    printInfo.JobName = "My first Print Job";

    var textFormatter = new UISimpleTextPrintFormatter ("Once upon a time...") {
        StartPage = 0,
        ContentInsets = new UIEdgeInsets (72, 72, 72, 72),
        MaximumContentWidth = 6 * 72,
    };

    var printer = UIPrintInteractionController.SharedPrintController;
    printer.PrintInfo = printInfo;
    printer.PrintFormatter = textFormatter;
    printer.ShowsPageRange = true;
    printer.Present (true, (handler, completed, err) => {
        if (!completed && err != null){
            Console.WriteLine ("error");
        }
    });
}
于 2011-04-27T11:55:43.910 回答