最新の SDK を使用して iOS アプリを開発しています。
私が行ったAndroidアプリからこのリソースがあります:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/gauge_background">
<gradient
android:startColor="#449def"
android:endColor="#2f6699"
android:angle="270" />
<stroke
android:width="1dp"
android:color="#2f6699" />
<corners android:radius="30dp" />
<padding
android:bottom="10dp"
android:left="10dp"
android:right="10dp"
android:top="10dp" />
</shape>
iOS アプリで使用したいと考えています。
このxmlをロードしてUIView backgroundColorとして表示する方法があるかどうか知っていますか?
このようなもの:
self.backgroundColor =
[[UIColor alloc] initWithPatternImage:[UIImage imageNamed:imageName]];