ios - Keyboard not showing for UITextField -
i have uiview contains uicollectionview, contains custom cells. these custom cells contain uilabel , uitextfield. code custom cell class , uicollectionview 1 of delegate methods is:
class durationdaycells: uicollectionviewcell { @iboutlet weak var daylabel: uilabel! @iboutlet weak var dayhourtext: uitextfield! } func collectionview(collectionview: uicollectionview, numberofitemsinsection section: int) -> int { return daysset.count } func collectionview(collectionview: uicollectionview!,layout collectionviewlayout: uicollectionviewlayout!,sizeforitematindexpath indexpath: nsindexpath!) -> cgsize { return cgsize(width: (self.durationcollectionview.frame.width/cgfloat(daysset.count)), height: self.durationcollectionview.frame.height) }
so can see, these cells dynamically created , sized according size of daysset
. problem when tap 1 of text fields in cells keyboard not pop (the pink/red view said uiview):
i have follow question when did manage make keyboard show (somehow), blocked pink/red uiview completely, there way move whole uiview when text field selected keyboard not block it?
about keyboard not showing up, simulator might set link computer's keyboard. xcode 6: keyboard not show in simulator
ios simulator -> hardware -> keyboard
uncheck "connect hardware keyboard"
for getting easy way have content scroll automatically when keyboard shows, cocoapod iqkeyboard built https://github.com/hackiftekhar/iqkeyboardmanager
if don't know cocoapods are, suggest checking them out @ https://cocoapods.org/
Comments
Post a Comment