• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# NSCoder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中NSCoder的典型用法代码示例。如果您正苦于以下问题:C# NSCoder类的具体用法?C# NSCoder怎么用?C# NSCoder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NSCoder类属于命名空间,在下文中一共展示了NSCoder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: InitWithCoder

        public override id InitWithCoder(NSCoder aDecoder)
        {
            base.InitWithCoder(aDecoder);

            //////////////////////////////////////////////////////////////////////////////
            //<object class="NSNibBindingConnector" key="connector">
            //    <reference key="NSSource" ref="898315540"/>
            //    <reference key="NSDestination" ref="622487602"/>
            //    <string key="NSLabel">content: arrangedObjects</string>
            //    <string key="NSBinding">content</string>
            //    <string key="NSKeyPath">arrangedObjects</string>
            //    <int key="NSNibBindingConnectorVersion">2</int>
            //</object>
            //////////////////////////////////////////////////////////////////////////////

            if (aDecoder.AllowsKeyedCoding)
            {
                if (aDecoder.DecodeIntForKey("NSNibBindingConnectorVersion") != 2)
                {
                    return null;
                }

                Binding = (NSString)aDecoder.DecodeObjectForKey("NSBinding");
                KeyPath = (NSString)aDecoder.DecodeObjectForKey("NSKeyPath");
                Options = (NSMutableDictionary)aDecoder.DecodeObjectForKey("NSOptions");

            }
            else
            {

            }

            return this;
        }
开发者ID:smartmobili,项目名称:CocoaBuilder,代码行数:34,代码来源:NSNibBindingConnector.cs


示例2: InitWithCoder

        //public NSCustomResource(NSObjectDecoder aDecoder)
        //    : base(aDecoder)
        //{
        //}
        public override id InitWithCoder(NSCoder aDecoder)
        {
            NSObject realObject = null;
            if (aDecoder.AllowsKeyedCoding)
            {
                _className = (NSString)aDecoder.DecodeObjectForKey("NSClassName");
                _resourceName = (NSString)aDecoder.DecodeObjectForKey("NSResourceName");

                if (_className == "NSSound")
                {
                    //realObject = null;
                }
                else if (_className == "NSImage")
                {
                    realObject = new NSImage();
                    ((NSImage)realObject).ResourceName = _resourceName;
                }
            }
            else
            {

            }

            return realObject;
        }
开发者ID:smartmobili,项目名称:CocoaBuilder,代码行数:29,代码来源:NSCustomResource.cs


示例3: EncodeTo

 public void EncodeTo(NSCoder coder)
 {
     coder.Encode(StartPoint.X, "startPointX");
     coder.Encode(StartPoint.Y, "startPointY");
     coder.Encode(Endpoint.X, "endPointX");
     coder.Encode(Endpoint.Y, "endPointY");
 }
开发者ID:yingfangdu,项目名称:BNR,代码行数:7,代码来源:Oval.cs


示例4: ListItem

		public ListItem(NSCoder coder)
		{
			Text = (string)(NSString)coder.DecodeObject (ListItemEncodingTextKey);
			NSUuid uid = (NSUuid)coder.DecodeObject (ListItemEncodingUUIDKey);
			UID = new Guid (uid.GetBytes());
			IsComplete = coder.DecodeBool (ListItemEncodingCompletedKey);
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:7,代码来源:ListItem.cs


示例5: Person

 public Person(NSCoder decoder)
 {
     NSString str = (NSString)decoder.DecodeObject("name");
     if (str != null)
         this.Name = str.ToString();
     this.ExpectedRaise = decoder.DecodeFloat("expectedRaise");
 }
开发者ID:yingfangdu,项目名称:BNR,代码行数:7,代码来源:Person.cs


示例6: EAGLView

 public EAGLView(NSCoder coder)
     : base(coder)
 {
     LayerRetainsBacking = false;
     LayerColorFormat    = EAGLColorFormat.RGBA8;
     ContextRenderingApi = EAGLRenderingAPI.OpenGLES1;
 }
开发者ID:bholmes,项目名称:NeHe-MonoTouch,代码行数:7,代码来源:EAGLView.cs


示例7: EncodeWithCoder

 public override void EncodeWithCoder(NSCoder aCoder)
 {
     if (aCoder.AllowsKeyedCoding)
     {
         aCoder.EncodeObjectForKey(_imageName, @"NSImageName");
     }
 }
开发者ID:smartmobili,项目名称:CocoaBuilder,代码行数:7,代码来源:NSButtonImageSource.cs


示例8: EAGLView

 public EAGLView(NSCoder coder)
     : base(coder)
 {
     _frameInterval = 1;
     LayerRetainsBacking = true;
     LayerColorFormat = EAGLColorFormat.RGBA8;
 }
开发者ID:jfoshee,项目名称:MonoTouch-Playground,代码行数:7,代码来源:EAGLView.cs


示例9: EAGLView

        public EAGLView(NSCoder coder)
            : base(coder)
        {
            LayerRetainsBacking = true;
            LayerColorFormat = EAGLColorFormat.RGBA8;

            MultipleTouchEnabled = true;
        }
开发者ID:BaldMan82,项目名称:iGL,代码行数:8,代码来源:EAGLView.cs


示例10: EAGLView

		public EAGLView (NSCoder coder) : base (coder)
		{
			LayerRetainsBacking = true;
			LayerColorFormat = EAGLColorFormat.RGBA8;

			// retina support
			ContentScaleFactor = UIScreen.MainScreen.Scale;
		}
开发者ID:Juliansanu,项目名称:mobile-samples,代码行数:8,代码来源:EAGLView.cs


示例11: List

		public List(NSCoder coder)
			: this()
		{
			NSArray array = (NSArray)coder.DecodeObject (ListEncodingItemsKey);
			for (nuint i = 0; i < array.Count; i++)
				items.Add (array.GetItem<ListItem> (i));

			Color = (ListColor)coder.DecodeInt (ListEncodingColorKey);
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:9,代码来源:List.cs


示例12: GADSearchBannerView

		public GADSearchBannerView (NSCoder coder) : base (NSObjectFlag.Empty)
		{
			IsDirectBinding = GetType ().Assembly == global::ApiDefinition.Messaging.this_assembly;
			if (IsDirectBinding) {
				Handle = MonoTouch.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr (this.Handle, Selector.InitWithCoder, coder.Handle);
			} else {
				Handle = MonoTouch.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr (this.SuperHandle, Selector.InitWithCoder, coder.Handle);
			}
		}
开发者ID:Reedyuk,项目名称:Xamarin-Bindings,代码行数:9,代码来源:GADSearchBannerView.g.cs


示例13: XMUtilities

		public XMUtilities (NSCoder coder) : base (NSObjectFlag.Empty)
		{
			IsDirectBinding = GetType ().Assembly == global::XMBindingLibrarySample.Messaging.this_assembly;
			if (IsDirectBinding) {
				Handle = MonoTouch.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr (this.Handle, Selector.InitWithCoder, coder.Handle);
			} else {
				Handle = MonoTouch.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr (this.SuperHandle, Selector.InitWithCoder, coder.Handle);
			}
		}
开发者ID:rojepp,项目名称:monotouch-samples,代码行数:9,代码来源:XMUtilities.g.cs


示例14: EncodeTo

 public override void EncodeTo(NSCoder coder)
 {
     if (this.Title != null)
         coder.Encode(new NSString(this.Title), "Title");
     if (this.Subtitle != null)
         coder.Encode(new NSString(this.Subtitle), "Subtitle");
     coder.Encode(this.Coordinate.Latitude, "Latitude");
     coder.Encode(this.Coordinate.Longitude, "Longitude");
 }
开发者ID:yingfangdu,项目名称:BNR,代码行数:9,代码来源:BNRMapPoint.cs


示例15: SmoothedBIView

		public SmoothedBIView (NSCoder aDecoder)
		{
			//            this.SetMultipleTouchEnabled(false);
			MultipleTouchEnabled = false;
			//            path = UIBezierPath.BezierPath();
			Path = new UIBezierPath ();
			//            path.SetLineWidth(2.0);
			Path.LineWidth = 3.0f;
		}
开发者ID:ClusterReplyBUS,项目名称:MonoTouch.Dialog,代码行数:9,代码来源:SmoothedBIView.cs


示例16: InitWithCoder

        public override id InitWithCoder(NSCoder decoder)
        {
            id self = this;

            base.InitWithCoder(decoder);

            OrderedObjects = (NSArray)decoder.DecodeObjectForKey("orderedObjects");

            return self;
        }
开发者ID:smartmobili,项目名称:CocoaBuilder,代码行数:10,代码来源:IBMutableOrderedSet.cs


示例17: MMDrawerBarButtonItem

		public MMDrawerBarButtonItem (NSCoder coder) : base (NSObjectFlag.Empty)
		{
			IsDirectBinding = GetType ().Assembly == global::ApiDefinitions.Messaging.this_assembly;

			if (IsDirectBinding) {
				InitializeHandle (global::ApiDefinitions.Messaging.IntPtr_objc_msgSend_IntPtr (this.Handle, Selector.InitWithCoder, coder.Handle), "initWithCoder:");
			} else {
				InitializeHandle (global::ApiDefinitions.Messaging.IntPtr_objc_msgSendSuper_IntPtr (this.SuperHandle, Selector.InitWithCoder, coder.Handle), "initWithCoder:");
			}
		}
开发者ID:adlair,项目名称:MMDrawerController,代码行数:10,代码来源:MMDrawerBarButtonItem.g.cs


示例18: BNRMapPoint

 public BNRMapPoint(NSCoder decoder)
 {
     NSString str = (NSString)decoder.DecodeObject(@"Title");
     if (str != null)
         _title = str.ToString();
     str = (NSString)decoder.DecodeObject(@"Subtitle");
     if (str != null)
         _subtitle = str.ToString();
     Coordinate = new CLLocationCoordinate2D(decoder.DecodeDouble(@"Latitude"), decoder.DecodeDouble(@"Longitude"));
 }
开发者ID:yingfangdu,项目名称:BNR,代码行数:10,代码来源:BNRMapPoint.cs


示例19: InitWithCoder

        public override id InitWithCoder(NSCoder aDecoder)
        {
            if (aDecoder.AllowsKeyedCoding)
            {
                Name = (NSString)aDecoder.DecodeObjectForKey("name");
                CandidateClassName = (NSString)aDecoder.DecodeObjectForKey("candidateClassName");
            }

            return this;
        }
开发者ID:smartmobili,项目名称:CocoaBuilder,代码行数:10,代码来源:IBActionInfo.cs


示例20: TOCropViewController

		public TOCropViewController (NSCoder coder) : base (NSObjectFlag.Empty)
		{
			IsDirectBinding = GetType ().Assembly == global::ApiDefinition.Messaging.this_assembly;

			if (IsDirectBinding) {
				InitializeHandle (global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr (this.Handle, Selector.GetHandle ("initWithCoder:"), coder.Handle), "initWithCoder:");
			} else {
				InitializeHandle (global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr (this.SuperHandle, Selector.GetHandle ("initWithCoder:"), coder.Handle), "initWithCoder:");
			}
		}
开发者ID:BradleyDHobbs,项目名称:Xamarin.CropView,代码行数:10,代码来源:TOCropViewController.g.cs



注:本文中的NSCoder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# NSData类代码示例发布时间:2022-05-24
下一篇:
C# NSBundle类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap