小编Mar*_*iam的帖子

Apple开发者帐户名称发生变化

一周前,我发送了一封苹果电子邮件,要求更改名称(我在附图中画了一圈红色圆圈),但他们没有回复!请你们中的任何一个人告诉我如何改变它吗?你怎么称呼这个名字,它的开发者名称还是什么?

在此输入图像描述

我通过以下链接发送了一封电子邮件:https: //developer.apple.com/contact/submit.php

iphone app-store ios

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

NSMutableParagraphStyle with NSMutableAttributedString

我有一个段落正在使用NSMutableParagraphStyle管理行高。另外,我想在段落中更改一个单词的颜色,这是我正在使用的代码,但它只是更改了一个单词的颜色(attributedText被覆盖),我该如何解决?有帮助吗?

NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];

paragraphStyle.lineHeightMultiple = 1.45f;

paragraphStyle.alignment = UITextAlignmentRight;

NSDictionary *ats = @{
                      NSFontAttributeName            : [UIFont fontWithName:@"Helvetica"
                                                                      size:currentSize],
                      NSParagraphStyleAttributeName  : paragraphStyle,

                      };


ayaTxt.attributedText    = [[NSAttributedString alloc] initWithString:ayaTxt.text
                                                             attributes:ats];

NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc]
                                         initWithString:ayaTxt.text];

NSRange range = [[AyatWords objectAtIndex:aya] rangeOfString:@":"];

[attrString addAttribute:NSForegroundColorAttributeName
                   value:[UIColor colorWithRed:(25.0/255.0)
                                         green:(168.0/255.0)
                                          blue:(167.0/255.0)
                                         alpha:1.0]
                   range:NSMakeRange(0, range.location + 1)];

ayaTxt.attributedText = attrString;
Run Code Online (Sandbox Code Playgroud)

谢谢 ..

objective-c uitextview uicolor nsmutableattributedstring

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

CAGradientLayer 径向渐变

我使用以下代码来设置渐变颜色:

NSArray *locations = @[@0.0, @0.1f];

CAGradientLayer *headerLayer = [CAGradientLayer layer];
headerLayer.colors = colors;
headerLayer.locations = locations;
Run Code Online (Sandbox Code Playgroud)

如何制作径向渐变颜色?

我想我必须改变位置,但我没有猜到正确的位置。另外,我试过这个:

headerLayer.anchorPoint = CGPointMake(0.5, 1.0);
Run Code Online (Sandbox Code Playgroud)

但它不起作用。

谢谢。

objective-c uiview cagradientlayer

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

.sks文件中SKSpriteNode的子类

我正在使用SpriteKit .sks文件我可以将.sks中的精灵变成SKSpriteNode的子类实例吗?

这是我的子类中的init方法:

    init(imageNamed: String) {

    let blockTexture = SKTexture(imageNamed: imageNamed)

    super.init(texture: blockTexture, color: nil, size: blockTexture.size())
}
Run Code Online (Sandbox Code Playgroud)

在GameScene.swift中,我可以创建一个这样的实例:

var myObj = Block(imageNamed: "Block")
Run Code Online (Sandbox Code Playgroud)

我的问题是如何将此实例与.sks文件相关联?

我尝试了这行代码,但它不起作用.

myObj     = childNodeWithName("block1") as Block
Run Code Online (Sandbox Code Playgroud)

有帮助吗?

谢谢.

sprite-kit swift xcode6

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

可以从json文件加载元组数组吗?

我需要从json文件加载一个元组数组.我尝试了以下但它不起作用.

我的json文件是:

{"破":[(1,1),(1,2),(2,2),(3,1)]}

然后我loadsjsonfrombundle用来从JSON加载数据如下:

let broken = [(Int, Int)]!

if let dictionary = Dictionary<String, AnyObject>.loadsjsonfrombundle(filename) { 

broken = (dictionary["broken"]) as Array

}
Run Code Online (Sandbox Code Playgroud)

有什么建议吗?

谢谢.

arrays json tuples ios swift

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