Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
Remove references to active account button in xib to avoid crashes an…
Browse files Browse the repository at this point in the history
…d remove references not longer needed
  • Loading branch information
nasli committed Nov 7, 2017
1 parent af837db commit dd7d92f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,14 @@

#import <UIKit/UIKit.h>

@protocol AccountCellDelegate

@optional
- (void)activeAccountByPosition:(NSInteger) position;
@end

@interface AccountCell : UITableViewCell


@property(nonatomic, weak) IBOutlet UILabel *userName;
@property(nonatomic, weak) IBOutlet UILabel *urlServer;
@property(nonatomic, weak) IBOutlet UIButton *activeButton;
@property (weak, nonatomic) IBOutlet UIButton *menuButton;
@property(nonatomic, weak) __weak id <AccountCellDelegate> delegate;


//- (IBAction)activeAccount:(id)sender;



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ - (void)setSelected:(BOOL)selected animated:(BOOL)animated
// Configure the view for the selected state
}

/*
-(IBAction)activeAccount:(id)sender {
[self.delegate activeAccountByPosition:self.activeButton.tag];
}
*/


@end
31 changes: 18 additions & 13 deletions Owncloud iOs Client/Tabs/SettingTab/Account/Cell/AccountCell.xib
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AccountCell"/>
Expand All @@ -21,16 +24,16 @@
<constraint firstAttribute="height" constant="21" id="MYe-rL-Wam"/>
</constraints>
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="15"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="15" translatesAutoresizingMaskIntoConstraints="NO" id="4">
<rect key="frame" x="41" y="20" width="236" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="xBM-Ms-0PZ"/>
</constraints>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="15"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</label>
<button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="249" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="12">
<rect key="frame" x="2" y="3" width="38" height="38"/>
Expand All @@ -40,15 +43,12 @@
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="activeAccount:" destination="2" eventType="touchUpInside" id="14"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qkx-Da-V7a">
<rect key="frame" x="279" y="3" width="38" height="38"/>
Expand Down Expand Up @@ -84,4 +84,9 @@
<point key="canvasLocation" x="672.5" y="367"/>
</tableViewCell>
</objects>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4_7.fullscreen"/>
</simulatedMetricsContainer>
</document>
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ typedef enum {

} enumInfoSetting;

@interface SettingsViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UIActionSheetDelegate, MFMailComposeViewControllerDelegate, KKPasscodeViewControllerDelegate, AccountCellDelegate, MBProgressHUDDelegate>
@interface SettingsViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UIActionSheetDelegate, MFMailComposeViewControllerDelegate, KKPasscodeViewControllerDelegate, MBProgressHUDDelegate>

@property(nonatomic,strong)IBOutlet UITableView *settingsTableView;
@property(nonatomic,strong)UISwitch *switchPasscode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,6 @@ - (AccountCell *) getSectionManageAccountBlock:(UITableViewCell *) cell byRow:(N
}
}

accountCell.delegate = self;
[accountCell.activeButton setTag:row];

accountCell.selectionStyle = UITableViewCellSelectionStyleNone;
Expand Down

0 comments on commit dd7d92f

Please sign in to comment.