Сделать текст webView правильным размером, но при этом сохранить размер ?IOS

Программируем под IOS
Гость
Сделать текст webView правильным размером, но при этом сохранить размер ?

Сообщение Гость »


Я загружаю WKWebView (iOS) в свое приложение и добавляю несколько тегов, чтобы загруженная строка выглядела нормально. Вот пример

Код: Выделить всё

htmlString = "" + (self.marker?.storeAccess ?? "") + ""
where

Код: Выделить всё

self.marker?.storeAccess
are my data.
I read at many forums that this line

Код: Выделить всё

initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0
will make my text "normal-sized", because originally it was too small to even read. And that's good, it works. But it also causing to overflow my and become cut in right-half. I wonder if there is a way to satisfy both

Код: Выделить всё

text-size
and

Код: Выделить всё

img-width
?
I tried stuffs like

Код: Выделить всё

img {
max-width: 100%;
height: auto;
}
and it didn't work.


Источник: https://stackoverflow.com/questions/781 ... e-img-size

Вернуться в «IOS»