如果你打开Settings -> General -> About,它会说Bob的iPhone位于屏幕顶部.你如何以编程方式获取该名称?
我似乎无法找到任何相关的东西.在iOS7中是否有任何Siri类或API可以让您进行文本到语音转换?我想要做的就是以下内容:
[siriInstance say:@"This is a test"];
Run Code Online (Sandbox Code Playgroud)
然后让Siri从我的应用程序中说出来.
看来我们应该有能力做到这一点,不是吗?看起来像是一件微不足道的事情.
我的ios应用程序使用蓝牙连接到附件.如果未启用蓝牙,则会出现一个弹出窗口,要求我激活.

我注意到每次运行应用程序时都会出现弹出窗口.
我的问题是,是否可以显示一次弹出窗口,即仅在第一次启动后(fitbit应用程序执行此操作.我还想知道是否可以更改弹出窗口的语言).
我的应用程序适用于iOS7和iOS6
如果我们无法改变语言,有没有办法禁用此弹出窗口,那么我将使用本地化系统开发自己的视图(弹出窗口)?
非常感谢你!
我使用for循环在scrollView中创建标签和按钮.是否可以删除我的scrollView中的所有对象?(我想用新内容更新它)
for peop in personArray{
scrollView.clearContent ??????
// Name label
var label: UILabel = UILabel()
label.frame = CGRectMake(8, CGFloat(nameHeight), 183, 21)
label.backgroundColor = UIColor.whiteColor()
label.textColor = UIColor(red: 90/255.0, green: 187/255.0, blue: 206/255.0, alpha: 1.0)
label.textAlignment = NSTextAlignment.Left
label.font = UIFont (name: "HelveticaNeue-Light", size: 14)
label.text = " \(peop.getName()) - \(sex)"
self.scrollView.addSubview(label)
//Delete button
var button = UIButton.buttonWithType(UIButtonType.System) as UIButton
button.tag = playerId
button.frame = CGRectMake(199, CGFloat(nameHeight), 37, 21)
button.backgroundColor = colorWheel.colorsArray[7]
button.setTitle("Slet", forState: UIControlState.Normal)
button.addTarget(self, action: "delAction:", forControlEvents: UIControlEvents.TouchUpInside)
button.setTitleColor(UIColor.whiteColor(), …Run Code Online (Sandbox Code Playgroud) 我正在尝试为我的UITableView制作自定义单元格.
所以,我创建了一个class(UITableViewCell),并命名为HomeCell.该类有一个xib文件,标签名为titleCell.
在我的cellForRowAtIndexPath方法中,我写道:
HomeCell *cell = (HomeCell *)[tableView dequeueReusableCellWithIdentifier:@"HomeCell"];
if(cell == nil){
NSArray *xib = [[NSBundle mainBundle] loadNibNamed:@"HomeCell" owner:self options:nil];
for(id oneObject in xib){
if([oneObject isKindOfClass:[HomeCell class]]){
cell = (HomeCell *) oneObject;
}
}
}
//Get object at index data
HomeObjectCell *tempObject = [self.dataForCell objectAtIndex:indexPath.row];
NSLog(@"Title : %@",tempObject.title); // The tempObject.title return a NSString example
cell.titleCell.text = tempObject.title; // <-- ERROR !
Run Code Online (Sandbox Code Playgroud)
当我运行应用程序时,我得到了:
[UITableViewCell titleCell]:无法识别的选择器发送到实例0x6e61890
任何的想法?
我尝试使用此方法获取所有子视图,但是当我运行应用程序时,我有一条消息发送到解除分配的实例错误.
subviewsArray = self.view.subviews;
for (int i=0; i <subviewsArray.count; i++) {
UIView *subview = [subviewsArray objectAtIndex:i];
if (subview.tag >= 0) {
[subview removeFromSuperview];
}
}
Run Code Online (Sandbox Code Playgroud)
在我的.h
@property (nonatomic, strong) NSArray *subviewsArray;
Run Code Online (Sandbox Code Playgroud) ios ×5
objective-c ×3
xcode ×2
bluetooth ×1
ios6 ×1
ios7 ×1
siri ×1
swift ×1
uikit ×1
uiscrollview ×1
uitableview ×1