本文整理汇总了C#中NSObject.ValueForKey方法的典型用法代码示例。如果您正苦于以下问题:C# NSObject.ValueForKey方法的具体用法?C# NSObject.ValueForKey怎么用?C# NSObject.ValueForKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NSObject
的用法示例。
在下文中一共展示了NSObject.ValueForKey方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FromResultObject
public static FBGraphObject[] FromResultObject(NSObject resultObject)
{
var results = new List<FBGraphObject> ();
var dataObject = resultObject.ValueForKey (new NSString ("data")) as NSMutableArray;
for (uint i = 0; i < dataObject.Count; i++) {
var o = Runtime.GetNSObject (dataObject.ValueAt (i));
results.Add (o as FBGraphObject);
}
return results.ToArray ();
}
示例2: FacebookRequestForMeCompleted
private void FacebookRequestForMeCompleted(FBRequestConnection connection, NSObject result, NSError error)
{
if (error == null)
{
Interfaces.Instance.FacebookInterface.UserEmail = result.ValueForKey(new NSString("email")) as NSString;
Interfaces.Instance.FacebookInterface.UserId = result.ValueForKey(new NSString("id")) as NSString;
if (!FBSession.ActiveSession.HasGranted("email"))
{
FBSession.ActiveSession.RequestNewReadPermissions(new string[] { "email" }, null);
UIAlertView alertView = new UIAlertView("APP/ALERT/TITLE/ERROR".Localize(), "APP/FACEBOOK/ERRORS/NEED_EMAIL".Localize(), null, "APP/ALERT/BUTTON/OK".Localize(), null);
alertView.Show();
return;
}
FacebookLogin();
}
else
{
HandleFacebookError(error);
}
}
示例3: GetStyleMode
//
// styleMode
//
public static PXStylingMode GetStyleMode(NSObject obj)
{
var mode = obj.ValueForKey (new NSString ("styleMode"));
var modeString = mode.ToString ();
return (PXStylingMode)Enum.Parse (typeof(PXStylingMode), modeString);
}
示例4: GetStyleId
//
// styleId
//
public static string GetStyleId(NSObject obj)
{
return (NSString) obj.ValueForKey (new NSString ("styleId"));
}