คลาสอิมเมจ GCK
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คลาสที่แสดงรูปภาพที่อยู่ในเว็บเซิร์ฟเวอร์
ใช้สำหรับสิ่งต่างๆ เช่น ไอคอน GCKDevice และอาร์ตเวิร์ก GCKMediaMetadata
รับค่า NSObject, <NSCopying> และ <NSSecureCoding>
- (instancetype) initWithURL: |
|
(NSURL *) |
URL |
width: |
|
(NSInteger) |
width |
height: |
|
(NSInteger) |
height |
|
|
| |
สร้าง GCKImage ใหม่ด้วย URL และขนาดที่กำหนด
เครื่องมือเริ่มต้นที่กำหนด
- Parameters
-
URL | The URL of the image. |
width | The width of the image, in pixels. |
height | The height of the image, in pixels. |
- ข้อยกเว้น
-
NSInvalidArgumentException | หาก URL เป็น nil หรือว่างเปล่า หรือขนาดไม่ถูกต้อง |
เครื่องมือเริ่มต้นไม่พร้อมใช้งาน
ความกว้างของรูปภาพเป็นพิกเซล
ความสูงของรูปภาพเป็นพิกเซล
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-12-02 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2023-12-02 UTC"],[[["The `GCKImage` class represents an image located on a web server, used for elements like device icons and media metadata artwork."],["It provides methods for initialization with a URL and dimensions, specifying the image's location and size."],["Key properties include `URL`, `width`, and `height`, offering access to the image's web address and pixel dimensions."],["The default initializer is unavailable; you must use the designated initializer with URL and dimensions."]]],["The GCKImage class represents a web-hosted image, used for elements like device icons and media artwork. Key actions include initializing a GCKImage object with `initWithURL:width:height:`, providing the image's URL, width, and height in pixels. The default initializer `init` is unavailable. Properties include `URL` for the image's location, `width` for pixel width, and `height` for pixel height. Initialization with an invalid URL or dimensions will throw an exception.\n"]]