小编fah*_*ahu的帖子

从代码中获取全局色调颜色

有没有办法可以通过代码从我的项目中获取全局色调颜色?为了避免误解,我的意思是全局色调颜色,我可以在文件检查器中设置.

tintcolor ios7 xcode5

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

Xcode 6:自动创建init函数?

Xcode 6中有没有办法自动生成init函数?

更好理解的一个例子:

我有这些属性:

var name: String
var location: String
var date : NSDate
var host: String
var description: String
Run Code Online (Sandbox Code Playgroud)

我想自动生成这个init函数:

    init (name: String, location: String, date: NSDate, host: String, description: String, eventReceived: NSDate) {
        self.name = name;
        self.location = location
        self.date = date
        self.host = host
        self.description = description
    }
Run Code Online (Sandbox Code Playgroud)

xcode ios swift xcode6

12
推荐指数
2
解决办法
4534
查看次数

Swift:一个数组中的不同对象?

是否有可能在一个数组中有两个不同的自定义对象?

我想在a中显示两个不同的对象UITableView,我认为最简单的方法是将所有对象放在一个数组中.

arrays xcode ios swift

5
推荐指数
3
解决办法
7879
查看次数

Prestashop:禁用联系表单

我想在我的prestashop安装中禁用联系表单,但没有插件可以这样做.有什么建议怎么做?

prestashop prestashop-1.6

3
推荐指数
2
解决办法
8005
查看次数

UIButton setTitle不会立即更改标题

我写作和阅读标题时遇到了麻烦UIButton.

我的问题:

// If I execute this line of code everything works fine, the title gets changed in the UI
[self.lastButtonPressed setTitle:stringDate forState:UIControlStateNormal];

// In the next line of code I want to read the title I've set before, but everything I get is the title of the UIButton before I changed the title.
NSString *myText = [self.lastButtonPressed.titleLabel.text];
Run Code Online (Sandbox Code Playgroud)

是否有可能[UIButton setTitle]被称为异步?如果是,是否有可能使此呼叫同步?

asynchronous objective-c uibutton ios

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

将NSNull对象分配给NSString

我正在编写一个iOS应用程序,我需要通过Azure上的移动服务从SQL数据库中获取数据.

下载数据后,我得到了一个NSDictionary包含SQL-Table的所有属性.如果属性为空,则值为NSNull.

有没有一种方法可以NSNullNSString没有IF语句的情况下传递给我(我不希望有20个if语句......)?

nsstring ios nsnull

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

转换日期时出错:JAVA中的无法解析日期

我找不到问题.我正在尝试转换日期:

"星期四,2014年7月10日13:33:26 +0200"

使用此代码从字符串到日期:

String formatType = "EEE, dd MMM yyyy HH:mm:ss Z";
Date startzeit = new SimpleDateFormat(formatType).parse(einsatz.getString("startzeit"));
Run Code Online (Sandbox Code Playgroud)

但我得到的不仅仅是:

java.text.ParseException: Unparseable date: "Thu, 10 Jul 2014 13:33:26 +0200"

java parsing android date exception

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