Skip to content

Commit

Permalink
ios 8 bug fix for iPhone and iPad
Browse files Browse the repository at this point in the history
  • Loading branch information
nalinchhajer1 committed Jan 5, 2015
1 parent 5331e09 commit c091189
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
7 changes: 3 additions & 4 deletions Classes/UI/HSIssueDetailViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ - (void)viewDidLoad

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardFrameWillChange:) name:UIKeyboardWillChangeFrameNotification object:nil];

self.bottomMessageView.translatesAutoresizingMaskIntoConstraints = YES;

self.bubbleWidth = 240.0;

Expand Down Expand Up @@ -120,6 +118,7 @@ - (void)addMessageView {
self.messageText.contentInset = UIEdgeInsetsMake(0, 5, 0, 5);
self.messageText.minNumberOfLines = 1;
self.messageText.maxNumberOfLines = 10;
self.messageText.returnKeyType = UIReturnKeyDone;

UIInterfaceOrientation currentOrientation = [[UIApplication sharedApplication] statusBarOrientation];

Expand Down Expand Up @@ -437,8 +436,8 @@ - (void)keyboardFrameWillChange: (NSNotification *)notification {
}
}



self.bottomMessageView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
self.bottomMessageView.translatesAutoresizingMaskIntoConstraints = YES;

self.chatTableView.contentInset = contentInsets;
self.chatTableView.scrollIndicatorInsets = contentInsets;
Expand Down
6 changes: 4 additions & 2 deletions Classes/UI/HSTicketDetailViewControlleriPad.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ - (void)viewDidLoad
super.bubbleWidth = 270.0;
msgEntered = nil;

self.bottomMessageView.translatesAutoresizingMaskIntoConstraints = YES;
// Do any additional setup after loading the view.
}

Expand Down Expand Up @@ -151,7 +150,7 @@ - (void)keyboardFrameWillChange: (NSNotification *)notification {
else {
// On ios 7 landscape x == ios 8 landscape y
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
containerFrame.origin.y = kKeyBoardFrame.origin.y - containerFrame.size.height - 32;
containerFrame.origin.y = kKeyBoardFrame.origin.y - containerFrame.size.height - 64;
}
else {
containerFrame.origin.y = kKeyBoardFrame.origin.y - containerFrame.size.height - 50;
Expand Down Expand Up @@ -179,6 +178,9 @@ - (void)keyboardFrameWillChange: (NSNotification *)notification {

[self scrollDownToLastMessage:YES];

self.bottomMessageView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
self.bottomMessageView.translatesAutoresizingMaskIntoConstraints = YES;

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationDuration:[duration doubleValue]];
Expand Down
1 change: 1 addition & 0 deletions Resources/HelpStackStoryboard-iPad.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@
<constraint firstAttribute="trailing" secondItem="pte-Fg-Fyj" secondAttribute="trailing" id="fCu-l1-yqO"/>
<constraint firstAttribute="trailing" secondItem="zH8-Up-Etj" secondAttribute="trailing" id="hxl-Fx-F7z"/>
<constraint firstItem="pte-Fg-Fyj" firstAttribute="top" secondItem="FP6-Kx-Q6V" secondAttribute="bottom" id="nt1-Wu-Hec"/>
<constraint firstAttribute="centerX" secondItem="zH8-Up-Etj" secondAttribute="centerX" id="xW0-Sc-DY6"/>
</constraints>
</view>
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
Expand Down
30 changes: 16 additions & 14 deletions Resources/HelpStackStoryboard.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,11 @@
<viewControllerLayoutGuide type="bottom" id="DvT-WW-Jzi"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="pZG-d9-Lt0">
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" allowsSelection="NO" rowHeight="91" sectionHeaderHeight="1" sectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="TW8-Xg-jkl">
<rect key="frame" x="0.0" y="0.0" width="320" height="460"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="559"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="MessageCell_Right" rowHeight="91" id="WEV-eZ-sqq" userLabel="Table View Cell - MessageCell-Right">
Expand All @@ -369,15 +369,15 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ynb-qZ-Df2" customClass="HSBubbleRightArrow">
<rect key="frame" x="302" y="70" width="7" height="10"/>
<rect key="frame" x="357" y="70" width="7" height="10"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" constant="7" id="G5X-Hr-YH0"/>
<constraint firstAttribute="height" constant="10" id="WF8-0p-WJ8"/>
</constraints>
</view>
<view tag="3" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CYp-VD-2ss" customClass="HSChatBubbleRight">
<rect key="frame" x="63" y="0.0" width="240" height="91"/>
<rect key="frame" x="118" y="0.0" width="240" height="91"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" constant="240" id="YqA-g5-lci"/>
Expand Down Expand Up @@ -433,7 +433,7 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view tag="3" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xbY-oa-i6g">
<rect key="frame" x="61" y="0.0" width="240" height="28"/>
<rect key="frame" x="116" y="0.0" width="240" height="28"/>
<subviews>
<label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="15 Days ago" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Puh-2r-Dcb" customClass="HSLabel">
<rect key="frame" x="0.0" y="-2" width="182" height="21"/>
Expand Down Expand Up @@ -507,7 +507,7 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view tag="3" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XTI-d0-ixS">
<rect key="frame" x="65" y="7" width="238" height="21"/>
<rect key="frame" x="120" y="7" width="238" height="21"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="User:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oKK-Zw-xJC" userLabel="Label" customClass="HSLabel">
<rect key="frame" x="0.0" y="3" width="182" height="21"/>
Expand Down Expand Up @@ -566,10 +566,10 @@
</connections>
</tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vxc-PN-oSd" userLabel="MessageView">
<rect key="frame" x="0.0" y="460" width="320" height="44"/>
<rect key="frame" x="0.0" y="559" width="375" height="44"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1DX-py-x4b" customClass="HSButton">
<rect key="frame" x="272" y="7" width="46" height="30"/>
<rect key="frame" x="327" y="7" width="46" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="VEd-GX-VW4"/>
<constraint firstAttribute="width" constant="46" id="r9t-s2-xzs"/>
Expand Down Expand Up @@ -598,10 +598,10 @@
</connections>
</button>
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="wxK-OQ-di3">
<rect key="frame" x="285" y="12" width="20" height="20"/>
<rect key="frame" x="340" y="12" width="20" height="20"/>
</activityIndicatorView>
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="caF-bA-v3Y" userLabel="growingmessageview">
<rect key="frame" x="43" y="5" width="226" height="34"/>
<rect key="frame" x="43" y="5" width="281" height="34"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" priority="900" constant="34" id="cTJ-IJ-qYt"/>
Expand All @@ -625,7 +625,7 @@
</constraints>
</view>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="white" translatesAutoresizingMaskIntoConstraints="NO" id="7Zs-2i-DGZ" customClass="HSActivityIndicatorView">
<rect key="frame" x="150" y="220" width="20" height="20"/>
<rect key="frame" x="178" y="270" width="20" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="hTG-iv-gdC"/>
<constraint firstAttribute="width" constant="20" id="vCh-ob-aDi"/>
Expand All @@ -643,10 +643,12 @@
<constraint firstItem="7Zs-2i-DGZ" firstAttribute="centerY" secondItem="TW8-Xg-jkl" secondAttribute="centerY" id="ZOC-Sg-p5c"/>
<constraint firstItem="DvT-WW-Jzi" firstAttribute="top" secondItem="vxc-PN-oSd" secondAttribute="bottom" priority="900" id="d4H-zu-c8U"/>
<constraint firstAttribute="trailing" secondItem="TW8-Xg-jkl" secondAttribute="trailing" id="dqh-dJ-nSD"/>
<constraint firstAttribute="centerX" secondItem="vxc-PN-oSd" secondAttribute="centerX" id="jGw-sy-JBG"/>
</constraints>
</view>
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
<navigationItem key="navigationItem" id="x2e-AY-rsZ"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
<connections>
<outlet property="addAttachmentButton" destination="Szx-vb-Fom" id="DSU-JC-imu"/>
<outlet property="bottomMessageView" destination="vxc-PN-oSd" id="EcQ-K1-Qua"/>
Expand All @@ -672,11 +674,11 @@
<viewControllerLayoutGuide type="bottom" id="Ivs-Yi-I18"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="mPS-Oo-IHA">
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<webView contentMode="scaleToFill" scalesPageToFit="YES" translatesAutoresizingMaskIntoConstraints="NO" id="f4f-qf-cSQ">
<rect key="frame" x="0.0" y="0.0" width="320" height="504"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</webView>
</subviews>
Expand All @@ -703,7 +705,7 @@
<objects>
<tableViewController id="wuj-rX-nEg" customClass="HSAttachmentsListViewController" sceneMemberID="viewController">
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="PXu-X7-muB">
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
Expand Down

0 comments on commit c091189

Please sign in to comment.