设置CAGradientLayer框架等于视图

时间:2019-12-03 10:06:43

标签: ios swift xcode

我有一个RoundView和一个带有渐变的图层,但是大小不同

// this is just ur data but as json string
$var = '[{"id":2,"name":"Bijj","categories":[{"id":10,"name":"Rice","sbu":2,"products":[{"id":25,"name":"Rajkumar","skus":[],"short_description":"বাংলাদেশের আবহাওয়া উপযোগী হাইব্রিড ধান"},{"id":50,"name":"Sera","skus":[],"short_description":"বাংলাদেশের আবহাওয়া উপযোগী হাইব্রিড ধান"}]},{"id":20,"name":"Vhutta","sbu":2,"products":[{"id":129,"name":"Pack-139","skus":[],"short_description":"মোচায় ৮৬ % দানা ও ১৪ % শাঁস"},{"id":125,"name":"Don-12","skus":[],"short_description":"সারা বৎসর চাষ উপযোগী"}]}]}]';

$objCollection = collect(json_decode($var, true));

$productNames = $objCollection->pluck('categories.*.products.*.name');

dd($productNames);

that how it looks like

0 个答案:

没有答案