質問

したがって、ホーム画面からアプリを削除するか、iBooksから本を削除する場合、「編集モード」に入ると、アプリアイコン/book/Whatingの左上隅に少しityty xがあります。

このボタンはSDKの一部ですか?

そして...そうでない場合(私はそれがそうではないと確信しています)、誰かがX画像を含む可能性のあるAppleサンプルプロジェクトを知っていますか?

役に立ちましたか?

解決

Springboard.appを探してみてください。 (スプリングボードはiOSのホーム画面です。)次のような場所に配置する必要があります。

/developer/platforms/iphonesimulator.platform/developer/sdks/iphonesimulator*xyz*.sdk/system/library/coreervices/springboard.app/

編集: 以下のコメントによると、4.1シミュレーターSDKの画像の場所は次のとおりです。

/developer/platforms/iphonesimulator.platform/developer/sdks/iphonesimulator4.1.sdk/system/library/coreervices/springboard.app/closebox.png /developer/platforms/iphonesimulator.platform/developer/sdks/iphonesulurature /system/library/coreervices/springboard.app/closebox@2x.png

他のヒント

クォーツを使用してこれを描画することに興味がある場合は、次のコードがこの種の削除ボタンをレンダリングするために作成したカレイヤーから引き出されます。

#define SPACETOEXPANDDELETELAYERFORSHADOW 4.0f
#define FRACTIONOFVIEWFORSTARTANDSTOPOFCROSSLINES 0.38

- (void)renderAsVectorInContext:(CGContextRef)context;
{
    if (strokeColor == NULL)
        return;

    CGContextSetLineJoin(context, kCGLineJoinBevel);
    CGContextSetStrokeColorWithColor(context, strokeColor);
    CGContextSetLineWidth(context, strokeWidth);
    CGContextSetLineCap(context, kCGLineCapRound);
    CGRect currentFrame = self.bounds;
    currentFrame = CGRectInset(currentFrame, SPACETOEXPANDDELETELAYERFORSHADOW, SPACETOEXPANDDELETELAYERFORSHADOW);

    CGContextSetShadow(context, CGSizeMake(2.0f, 2.0f), 2.0f);
    CGContextFillEllipseInRect(context, CGRectMake(currentFrame.origin.x + strokeWidth, currentFrame.origin.y + strokeWidth, currentFrame.size.width - (2.0f * strokeWidth), currentFrame.size.height - (2.0f * strokeWidth)));
    CGContextStrokeEllipseInRect(context, CGRectMake(currentFrame.origin.x + strokeWidth, currentFrame.origin.y + strokeWidth, currentFrame.size.width - (2.0f * strokeWidth), currentFrame.size.height - (2.0f * strokeWidth)));

    CGContextSetLineWidth(context, 1.3f * strokeWidth);
    CGContextBeginPath(context);

    CGContextMoveToPoint(context, currentFrame.origin.x + FRACTIONOFVIEWFORSTARTANDSTOPOFCROSSLINES * currentFrame.size.width, currentFrame.origin.y + FRACTIONOFVIEWFORSTARTANDSTOPOFCROSSLINES * currentFrame.size.height);
    CGContextAddLineToPoint(context, currentFrame.origin.x + (1.0f - FRACTIONOFVIEWFORSTARTANDSTOPOFCROSSLINES) * currentFrame.size.width, currentFrame.origin.y + (1.0f - FRACTIONOFVIEWFORSTARTANDSTOPOFCROSSLINES) * currentFrame.size.height);
    CGContextMoveToPoint(context, currentFrame.origin.x + (1.0f - FRACTIONOFVIEWFORSTARTANDSTOPOFCROSSLINES) * currentFrame.size.width, currentFrame.origin.y + FRACTIONOFVIEWFORSTARTANDSTOPOFCROSSLINES * currentFrame.size.height);
    CGContextAddLineToPoint(context, currentFrame.origin.x + FRACTIONOFVIEWFORSTARTANDSTOPOFCROSSLINES * currentFrame.size.width, currentFrame.origin.y + (1.0f - FRACTIONOFVIEWFORSTARTANDSTOPOFCROSSLINES) * currentFrame.size.height);

    CGContextStrokePath(context);
}

この場合、 strokeColor 白いcgcolorref、レイヤーは31 x 31、そして strokeWidth 2.0です。

この画像を使用したい場合は、

  • どこかからカットします
  • Photoshopで背景を透明にします
  • 画像をカスタムuibuttonに追加します。

申し訳ありませんが、それを使用するプロジェクトを覚えていません...

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top