hyperoslo / hyperoslo/Lightbox

Multiple images and video in the array loop

Open
#281 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
1.7k
Forks
332
PR merge metrics
No merged PRs in 30d

Description

How to construct the below array in for loop as i need to append all my photo library items to show in the slider like inbuilt iphone.

let images = [
LightboxImage(imageURL: URL(string: "https://cdn.arstechnica.net/2011/10/05/iphone4s_sample_apple-4e8c706-intro.jpg")!),
LightboxImage(
image: UIImage(named: "photo1")!,
text: "This is an example of a remote image loaded from URL"
),
LightboxImage(
image: UIImage(named: "photo2")!,
text: "",
videoURL: URL(string: "https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
),
LightboxImage(
image: UIImage(named: "photo3")!,
text: "This is an example of a local image."
)
]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.