Skip to content

Commit 2584c8d

Browse files
committed
Updated for 64-bit, started updating UI to modern conventions.
1 parent b5816b8 commit 2584c8d

19 files changed

+109
-83
lines changed

English.lproj/Info.plist

+3-1
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,13 @@
7575
</dict>
7676
</array>
7777
<key>CFBundleVersion</key>
78-
<string>2.10</string>
78+
<string>2.20</string>
7979
<key>LSRequiresIPhoneOS</key>
8080
<true/>
8181
<key>UIFileSharingEnabled</key>
8282
<true/>
83+
<key>UILaunchStoryboardName</key>
84+
<string>LaunchScreen</string>
8385
<key>UIPrerenderedIcon</key>
8486
<true/>
8587
<key>UIStatusBarStyle</key>

GLProgram.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ - (void)addAttribute:(NSString *)attributeName
114114
{
115115
[attributes addObject:attributeName];
116116
glBindAttribLocation(program,
117-
[attributes indexOfObject:attributeName],
117+
(GLuint)[attributes indexOfObject:attributeName],
118118
[attributeName UTF8String]);
119119
}
120120
}
121121
// END:addattribute
122122
// START:indexmethods
123123
- (GLuint)attributeIndex:(NSString *)attributeName
124124
{
125-
return [attributes indexOfObject:attributeName];
125+
return (GLuint)[attributes indexOfObject:attributeName];
126126
}
127127
- (GLuint)uniformIndex:(NSString *)uniformName
128128
{

LaunchScreen.storyboard

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="1ZP-Zf-vf2">
3+
<device id="retina4_7" orientation="portrait">
4+
<adaptation id="fullscreen"/>
5+
</device>
6+
<dependencies>
7+
<deployment identifier="iOS"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
9+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
10+
</dependencies>
11+
<scenes>
12+
<!--View Controller-->
13+
<scene sceneID="fBP-e4-0If">
14+
<objects>
15+
<viewController id="1ZP-Zf-vf2" sceneMemberID="viewController">
16+
<layoutGuides>
17+
<viewControllerLayoutGuide type="top" id="0fP-wn-px5"/>
18+
<viewControllerLayoutGuide type="bottom" id="N5I-sN-zNQ"/>
19+
</layoutGuides>
20+
<view key="view" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Rbf-xA-nZt">
21+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
22+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
23+
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
24+
</view>
25+
</viewController>
26+
<placeholder placeholderIdentifier="IBFirstResponder" id="aAM-Y5-lOe" userLabel="First Responder" sceneMemberID="firstResponder"/>
27+
</objects>
28+
<point key="canvasLocation" x="-356" y="-140"/>
29+
</scene>
30+
</scenes>
31+
</document>

Molecules.xcodeproj/project.pbxproj

+13-18
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
1414
28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; };
1515
28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; };
16+
BC1175B220F1514C00CCEAC9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC1175B120F1514C00CCEAC9 /* LaunchScreen.storyboard */; };
1617
BC146A9B0EC9173000CE5E72 /* SLSMoleculeCustomDownloadViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC146A9A0EC9173000CE5E72 /* SLSMoleculeCustomDownloadViewController.m */; };
1718
BC157287136CBE9200EEFBEC /* 3QE5.pdb.gz in Resources */ = {isa = PBXBuildFile; fileRef = BC157286136CBE9200EEFBEC /* 3QE5.pdb.gz */; };
1819
BC15728A136CC58A00EEFBEC /* SLSMoleculeLibraryTableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC157289136CC58A00EEFBEC /* SLSMoleculeLibraryTableCell.m */; };
@@ -104,6 +105,7 @@
104105
28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
105106
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
106107
8D1107310486CEB800E47090 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = English; path = English.lproj/Info.plist; sourceTree = "<group>"; };
108+
BC1175B120F1514C00CCEAC9 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
107109
BC146A990EC9173000CE5E72 /* SLSMoleculeCustomDownloadViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SLSMoleculeCustomDownloadViewController.h; sourceTree = "<group>"; };
108110
BC146A9A0EC9173000CE5E72 /* SLSMoleculeCustomDownloadViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SLSMoleculeCustomDownloadViewController.m; sourceTree = "<group>"; };
109111
BC157286136CBE9200EEFBEC /* 3QE5.pdb.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = 3QE5.pdb.gz; sourceTree = "<group>"; };
@@ -308,6 +310,7 @@
308310
BCDFF57211546FB2005C984C /* RotationIconiPadCancel.png */,
309311
BCDFF57F115473AD005C984C /* VisualizationIcon.png */,
310312
BC54D56D151A3951003F4A41 /* VisualizationIcon@2x.png */,
313+
BC1175B120F1514C00CCEAC9 /* LaunchScreen.storyboard */,
311314
);
312315
name = Resources;
313316
sourceTree = "<group>";
@@ -556,6 +559,7 @@
556559
BC54D577151A4C91003F4A41 /* Default-Landscape@2x.png in Resources */,
557560
BC54D578151A4C91003F4A41 /* Default-Portrait@2x.png in Resources */,
558561
BCD4072F151D702600E622EA /* 98-palette.png in Resources */,
562+
BC1175B220F1514C00CCEAC9 /* LaunchScreen.storyboard in Resources */,
559563
BCD40730151D702600E622EA /* 98-palette@2x.png in Resources */,
560564
);
561565
runOnlyForDeploymentPostprocessing = 0;
@@ -633,43 +637,39 @@
633637
isa = XCBuildConfiguration;
634638
buildSettings = {
635639
ALWAYS_SEARCH_USER_PATHS = NO;
640+
ARCHS = "$(ARCHS_STANDARD)";
636641
CLANG_ENABLE_OBJC_ARC = YES;
637642
COPY_PHASE_STRIP = NO;
638643
GCC_PRECOMPILE_PREFIX_HEADER = YES;
639644
GCC_PREFIX_HEADER = Molecules_Prefix.pch;
640645
INFOPLIST_FILE = English.lproj/Info.plist;
641-
IPHONEOS_DEPLOYMENT_TARGET = 4.2;
646+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
642647
PRODUCT_NAME = Molecules;
643-
TARGETED_DEVICE_FAMILY = "1,2";
644648
};
645649
name = Debug;
646650
};
647651
1D6058950D05DD3E006BFB54 /* Release */ = {
648652
isa = XCBuildConfiguration;
649653
buildSettings = {
650654
ALWAYS_SEARCH_USER_PATHS = NO;
655+
ARCHS = "$(ARCHS_STANDARD)";
651656
CLANG_ENABLE_OBJC_ARC = YES;
652657
CODE_SIGN_IDENTITY = "iPhone Developer";
653658
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
654659
COPY_PHASE_STRIP = YES;
655660
GCC_PRECOMPILE_PREFIX_HEADER = YES;
656661
GCC_PREFIX_HEADER = Molecules_Prefix.pch;
657662
INFOPLIST_FILE = English.lproj/Info.plist;
658-
IPHONEOS_DEPLOYMENT_TARGET = 4.2;
663+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
659664
PRODUCT_NAME = Molecules;
660665
PROVISIONING_PROFILE = "";
661666
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
662-
TARGETED_DEVICE_FAMILY = "1,2";
663667
};
664668
name = Release;
665669
};
666670
BC78D1AC0E1FDC0600BD9B0B /* Distribution */ = {
667671
isa = XCBuildConfiguration;
668672
buildSettings = {
669-
ARCHS = (
670-
armv7,
671-
armv6,
672-
);
673673
CODE_SIGN_IDENTITY = "iPhone Distribution";
674674
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
675675
GCC_C_LANGUAGE_STANDARD = c99;
@@ -692,6 +692,7 @@
692692
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
693693
RUN_CLANG_STATIC_ANALYZER = YES;
694694
SDKROOT = iphoneos;
695+
TARGETED_DEVICE_FAMILY = "1,2";
695696
WARNING_CFLAGS = "";
696697
};
697698
name = Distribution;
@@ -700,28 +701,24 @@
700701
isa = XCBuildConfiguration;
701702
buildSettings = {
702703
ALWAYS_SEARCH_USER_PATHS = NO;
704+
ARCHS = "$(ARCHS_STANDARD)";
703705
CLANG_ENABLE_OBJC_ARC = YES;
704706
CODE_SIGN_IDENTITY = "iPhone Distribution";
705707
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
706708
COPY_PHASE_STRIP = YES;
707709
GCC_PRECOMPILE_PREFIX_HEADER = YES;
708710
GCC_PREFIX_HEADER = Molecules_Prefix.pch;
709711
INFOPLIST_FILE = English.lproj/Info.plist;
710-
IPHONEOS_DEPLOYMENT_TARGET = 4.2;
712+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
711713
PRODUCT_NAME = Molecules;
712714
PROVISIONING_PROFILE = "";
713715
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
714-
TARGETED_DEVICE_FAMILY = "1,2";
715716
};
716717
name = Distribution;
717718
};
718719
C01FCF4F08A954540054247B /* Debug */ = {
719720
isa = XCBuildConfiguration;
720721
buildSettings = {
721-
ARCHS = (
722-
armv7,
723-
armv6,
724-
);
725722
CODE_SIGN_IDENTITY = "iPhone Developer";
726723
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
727724
GCC_C_LANGUAGE_STANDARD = c99;
@@ -745,17 +742,14 @@
745742
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
746743
RUN_CLANG_STATIC_ANALYZER = YES;
747744
SDKROOT = iphoneos;
745+
TARGETED_DEVICE_FAMILY = "1,2";
748746
WARNING_CFLAGS = "";
749747
};
750748
name = Debug;
751749
};
752750
C01FCF5008A954540054247B /* Release */ = {
753751
isa = XCBuildConfiguration;
754752
buildSettings = {
755-
ARCHS = (
756-
armv7,
757-
armv6,
758-
);
759753
CODE_SIGN_IDENTITY = "iPhone Developer";
760754
"CODE_SIGN_IDENTITY[sdk=*]" = "iPhone Developer";
761755
GCC_C_LANGUAGE_STANDARD = c99;
@@ -778,6 +772,7 @@
778772
"PROVISIONING_PROFILE[sdk=*]" = "";
779773
RUN_CLANG_STATIC_ANALYZER = YES;
780774
SDKROOT = iphoneos;
775+
TARGETED_DEVICE_FAMILY = "1,2";
781776
WARNING_CFLAGS = "";
782777
};
783778
name = Release;

NSData+Gzip.m

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ - (id)initWithGzippedData: (NSData *)gzippedData;
1717
{
1818
if ([gzippedData length] == 0) return nil;
1919

20-
unsigned full_length = [gzippedData length];
21-
unsigned half_length = [gzippedData length] / 2;
20+
unsigned long full_length = [gzippedData length];
21+
unsigned long half_length = [gzippedData length] / 2;
2222

2323
NSMutableData *decompressed = [[NSMutableData alloc] initWithLength:(full_length + half_length)];
2424
BOOL done = NO;
2525
int status;
2626

2727
z_stream strm;
2828
strm.next_in = (Bytef *)[gzippedData bytes];
29-
strm.avail_in = [gzippedData length];
29+
strm.avail_in = (unsigned int)[gzippedData length];
3030
strm.total_out = 0;
3131
strm.zalloc = Z_NULL;
3232
strm.zfree = Z_NULL;
@@ -41,7 +41,7 @@ - (id)initWithGzippedData: (NSData *)gzippedData;
4141
if (strm.total_out >= [decompressed length])
4242
[decompressed increaseLengthBy: half_length];
4343
strm.next_out = [decompressed mutableBytes] + strm.total_out;
44-
strm.avail_out = [decompressed length] - strm.total_out;
44+
strm.avail_out = (unsigned int)[decompressed length] - (unsigned int)strm.total_out;
4545

4646
// Inflate another chunk.
4747
status = inflate (&strm, Z_SYNC_FLUSH);
@@ -70,7 +70,7 @@ - (NSData *)gzipDeflate
7070
strm.opaque = Z_NULL;
7171
strm.total_out = 0;
7272
strm.next_in=(Bytef *)[self bytes];
73-
strm.avail_in = [self length];
73+
strm.avail_in = (unsigned int)[self length];
7474

7575
// Compresssion Levels:
7676
// Z_NO_COMPRESSION
@@ -88,7 +88,7 @@ - (NSData *)gzipDeflate
8888
[compressed increaseLengthBy: 16384];
8989

9090
strm.next_out = [compressed mutableBytes] + strm.total_out;
91-
strm.avail_out = [compressed length] - strm.total_out;
91+
strm.avail_out = (unsigned int)[compressed length] - (unsigned int)strm.total_out;
9292

9393
deflate(&strm, Z_FINISH);
9494

SLSAtomColorKeyController.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ - (void)viewDidLoad
3535

3636
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
3737
{
38-
self.contentSizeForViewInPopover = CGSizeMake(250.0f, 864.0f);
38+
self.preferredContentSize = CGSizeMake(250.0f, 864.0f);
3939
// self.contentSizeForViewInPopover = CGSizeMake(200.0f, 864.0f);
4040
}
4141

SLSMolecule+SDF.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ - (BOOL)readFromSDFFileToDatabase:(NSError **)error;
114114

115115
NSString *atomElement = [[currentLine substringWithRange:NSMakeRange(31, 3)] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
116116

117-
[atomCoordinates setObject:[NSValue valueWithBytes:&atomCoordinate objCType:@encode(SLS3DPoint)] forKey:[NSNumber numberWithInt:atomSerialNumber]];
117+
[atomCoordinates setObject:[NSValue valueWithBytes:&atomCoordinate objCType:@encode(SLS3DPoint)] forKey:[NSNumber numberWithInteger:atomSerialNumber]];
118118
atomSerialNumber++;
119119

120120
SLSAtomType processedAtomType;
@@ -202,8 +202,8 @@ - (BOOL)readFromSDFFileToDatabase:(NSError **)error;
202202
NSUInteger indexForFirstAtom = [[currentLine substringWithRange:NSMakeRange(0, 3)] intValue];
203203
NSUInteger indexForSecondAtom = [[currentLine substringWithRange:NSMakeRange(3, 3)] intValue];
204204

205-
NSValue *startValue = [atomCoordinates objectForKey:[NSNumber numberWithInt:indexForFirstAtom]];
206-
NSValue *endValue = [atomCoordinates objectForKey:[NSNumber numberWithInt:indexForSecondAtom]];
205+
NSValue *startValue = [atomCoordinates objectForKey:[NSNumber numberWithInteger:indexForFirstAtom]];
206+
NSValue *endValue = [atomCoordinates objectForKey:[NSNumber numberWithInteger:indexForSecondAtom]];
207207

208208
[self addBondToDatabaseWithStartPoint:startValue endPoint:endValue bondType:SINGLEBOND structureNumber:1 residueKey:UNKNOWNRESIDUE];
209209
}

0 commit comments

Comments
 (0)