小编jef*_*leo的帖子

Windows Phone 8.1页面导航

我还是Windows Phone开发的新手.所以现在我要开发Windwos Phone 8.1.我真的不知道页面导航的问题是什么.我写了这样的代码

private void hbGo_Click(object sender, RoutedEventArgs e)
{
    this.Frame.Navigate(typeof(SecondPage));
}
Run Code Online (Sandbox Code Playgroud)

但它显示了错误(此页面不包含"框架"的定义,并且没有扩展方法"框架"接受第一个参数)即使我像底部的代码也一样...

Frame.Navigate(typeof(SecondPage));
Run Code Online (Sandbox Code Playgroud)

c# xaml windows-phone windows-phone-8.1

8
推荐指数
1
解决办法
2万
查看次数

Windows Phone 8.1 API

是否有Windows Phone 8.1 API参考?这是因为我想开发Windows Phone 8.1应用程序,但我不知道在哪里引用API,因为Windows Phone 8.1和8有很大不同,所以我不能参考Windows Phone 8 API.

windows-phone-8.1

4
推荐指数
1
解决办法
5133
查看次数

按YES之前确认退出Java程序

private void windowClosing(java.awt.event.WindowEvent evt)                               
    {                                   
        int confirmed = JOptionPane.showConfirmDialog(null, "Exit Program?","EXIT",JOptionPane.YES_NO_OPTION);
        if(confirmed == JOptionPane.YES_OPTION)
        {
            dispose();
        }
    }
Run Code Online (Sandbox Code Playgroud)

我想通过按确认关闭窗口按钮来关闭程序......但是当我选择"否"返回我的Jframe时,它仍然可以帮助我退出程序???

java swing window jframe joptionpane

2
推荐指数
2
解决办法
1万
查看次数

在Swift Parse中获取当前用户自定义列数据

如您所见,这是允许用户登录ios应用程序的User类

当我通过此用户登录到我自己的应用程序时,在我登录后,如何获取该用户的自定义列数据?例如,我想从这个用户获取IntakeCode并在文本字段中显示它,我该怎么做?

我试过这段代码,但它没有用,它说的

'AnyObject'不能转换为'String'; 你的意思是用'as!' 迫使低垂?

var displayIntake:NSString = PFUser.currentUser()!.objectForKey("IntakeCode")
txtIntake.text = displayIntake as String
Run Code Online (Sandbox Code Playgroud)

希望有人可以帮忙,我只想在文本字段中显示来自此用户的IntakeCode.

ios parse-platform swift xcode6 ios8

2
推荐指数
1
解决办法
3853
查看次数

按下iOS swift后更改UIBarButtonItem图标

viewDidload方法中,我已经声明了一个按钮并设置了RightBarButton ...

    let btnFavourite = UIButton(frame: CGRectMake(0,0,30,30))
    btnFavourite.addTarget(self, action: "btnFavourite:", forControlEvents: .TouchUpInside)
    btnFavourite.setImage(UIImage(named: "star"), forState: .Normal)
    btnFavourite.setImage(UIImage(named: "star_filled"), forState: .Highlighted)
    let rightButton = UIBarButtonItem(customView: btnFavourite)
    self.navigationItem.setRightBarButtonItems([rightButton], animated: true)
Run Code Online (Sandbox Code Playgroud)

如何从图像'star.png'按下按钮然后更改为'star_filled.png'?然后按'star_filled.png'中的按钮到'star.png'?

如何使两个功能像

func btnFavourite()
{
    //clicked the favourite button then image change to star_filled.png
}

fun btnUnfavourite()
{
    //clicked the button then the bar button image change to star.png
}
Run Code Online (Sandbox Code Playgroud)

image button uibarbuttonitem ios swift

2
推荐指数
1
解决办法
4198
查看次数

editActionsForRowAtIndexPath用于iOS Swift的一个部分

第一节在这里

第二节在这里

正如您在图像中看到的,此表中有两个部分.我是否知道如何设置仅在第一部分中启用editActionsForRowAtIndexPath?

这是我的代码,使tableViewCell有一个行滑动...

override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]?
{
    let complete =  UITableViewRowAction(style: .Normal, title: "Complete")
    { action, index in
        print("more button tapped")
    }
    complete.backgroundColor = UIColor.greenColor()
    return [complete]
}
Run Code Online (Sandbox Code Playgroud)

uitableview ios swift

1
推荐指数
1
解决办法
2412
查看次数