我有一个带有 xib 的自定义单元格。在 xib 中,我只插入了 UIImageView。我通过 UICollectionViewDelegateFlowLayout 设置单元格大小,以便每行有 3 个单元格,并且一切似乎都正常。但是当我开始向 UIImageView 中插入图片时,单元格大小增加了好几倍,单元格变得巨大,也就是说,在插入图片之前,单元格显示正确。我不明白应该在单元格 xib 中为 uiimageview 设置哪些约束和设置。我尝试设置顶部、左侧、右侧、底部、方面适合和剪辑到边界,但它没有帮助。我究竟做错了什么?
主页
/
user-351473
badyi badyi's questions
MVP 架构。
我正在制作一个应用程序,允许您通过 instagram 登录,然后显示您帐户中的一些信息。
我了解我应该拥有一个个人资料模型(Instagram 上的页面个人资料)。
事实证明,我将有一个演示者和一个ProfileService
用于加载数据的类。
也就是说
struct Profile
,
protocol ProfileViewDelegate
class ProfilePresenter {
var pc: ProfileService
var pfd: ProfileViewDelegate
}
class ProfileService
我已经有两个屏幕:授权和配置文件显示。假设我还有几个屏幕,例如,显示订阅者列表。我是否还需要单独为其制作演示者等?我是否需要为每个屏幕、授权屏幕等设置演示者?
如果我误解了,你能建议一个近似的类结构吗?
{
"message": {
"affenpinscher": [],
"african": [],
"airedale": [],
"akita": [],
"appenzeller": [],
"basenji": [],
"beagle": [],
"bluetick": [],
"borzoi": [],
"bouvier": [],
"boxer": [],
"brabancon": [],
"briard": [],
"buhund": [
"norwegian"
],
"bulldog": [
"boston",
"english",
"french"
],
"bullterrier": [
"staffordshire"
],
"cairn": [],
"cattledog": [
"australian"
],
"chihuahua": [],
"chow": [],
"clumber": [],
"cockapoo": [],
"collie": [
"border"
],
"coonhound": [],
"corgi": [
"cardigan"
],
"cotondetulear": [],
"dachshund": [],
"dalmatian": [],
"dane": [
"great"
],
"deerhound": [
"scottish"
],
"dhole": [],
"dingo": [],
"doberman": [],
"elkhound": [
"norwegian"
],
"entlebucher": [],
"eskimo": [],
"frise": [
"bichon"
],
"germanshepherd": [],
"greyhound": [
"italian"
],
"groenendael": [],
"hound": [
"afghan",
"basset",
"blood",
"english",
"ibizan",
"walker"
],
"husky": [],
"keeshond": [],
"kelpie": [],
"komondor": [],
"kuvasz": [],
"labrador": [],
"leonberg": [],
"lhasa": [],
"malamute": [],
"malinois": [],
"maltese": [],
"mastiff": [
"bull",
"english",
"tibetan"
],
"mexicanhairless": [],
"mix": [],
"mountain": [
"bernese",
"swiss"
],
"newfoundland": [],
"otterhound": [],
"papillon": [],
"pekinese": [],
"pembroke": [],
"pinscher": [
"miniature"
],
"pitbull": [],
"pointer": [
"german",
"germanlonghair"
],
"pomeranian": [],
"poodle": [
"miniature",
"standard",
"toy"
],
"pug": [],
"puggle": [],
"pyrenees": [],
"redbone": [],
"retriever": [
"chesapeake",
"curly",
"flatcoated",
"golden"
],
"ridgeback": [
"rhodesian"
],
"rottweiler": [],
"saluki": [],
"samoyed": [],
"schipperke": [],
"schnauzer": [
"giant",
"miniature"
],
"setter": [
"english",
"gordon",
"irish"
],
"sheepdog": [
"english",
"shetland"
],
"shiba": [],
"shihtzu": [],
"spaniel": [
"blenheim",
"brittany",
"cocker",
"irish",
"japanese",
"sussex",
"welsh"
],
"springer": [
"english"
],
"stbernard": [],
"terrier": [
"american",
"australian",
"bedlington",
"border",
"dandie",
"fox",
"irish",
"kerryblue",
"lakeland",
"norfolk",
"norwich",
"patterdale",
"russell",
"scottish",
"sealyham",
"silky",
"tibetan",
"toy",
"westhighland",
"wheaten",
"yorkshire"
],
"vizsla": [],
"waterdog": [
"spanish"
],
"weimaraner": [],
"whippet": [],
"wolfhound": [
"irish"
]
},
"status": "success"
}