This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface LabelSizer : NSObject { | |
} | |
+(float)getExpectedHeightForLabel:(UILabel*)label; | |
+(float)makeLabelCorrectSizeForCurrentWidth:(UILabel*)label; | |
+(float)getExpectedHeightForText:(NSString*)text withFontName:(NSString*)font atSize:(float)fontSize inContainerWidth:(float)width; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface HTMLLineBreakConvertor : NSObject <NSXMLParserDelegate> { | |
NSMutableString* resultString; | |
NSDictionary* tags; | |
} | |
- (NSString*)convertEntiesInString:(NSString*)s; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "DJPWebViewDelegate.h" | |
#import "DJPWebViewContent.h" | |
@interface DJPWebView : UIWebView { | |
DJPWebViewDelegate* delegateObject; | |
DJPWebViewContent* content; | |
} | |
@property(nonatomic, retain)DJPWebViewContent* content; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface UILabel (dynamicSizeMe) | |
-(float)resizeToFit; | |
-(float)expectedHeight; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface UILabel (GetLines) | |
- (NSArray*) lines; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface DJPAppDelegate : UIResponder <UIApplicationDelegate, UIAppearanceContainer> | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (IBAction)showWalkingDirections:(id)sender { | |
if ([self.parkingDetails.mapItem respondsToSelector:@selector(openInMapsWithLaunchOptions:)]) { | |
NSDictionary *launchOptions = @{ | |
MKLaunchOptionsDirectionsModeKey : MKLaunchOptionsDirectionsModeWalking, | |
MKLaunchOptionsMapTypeKey : [NSNumber numberWithInt:MKMapTypeStandard] | |
}; | |
[self.parkingDetails.mapItem openInMapsWithLaunchOptions:launchOptions]; | |
} else { | |
NSString *mapURL = @"http://maps.google.com/maps?"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <MapKit/MapKit.h> | |
@interface DPAnnotationView : MKAnnotationView | |
@property (nonatomic, assign) MKMapView *mapView; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import <CommonCrypto/CommonHMAC.h> | |
@interface NSString (Crypto) | |
- (NSString *)md5; | |
+ (NSString *)encodeBase64WithString:(NSString *)strData; | |
+ (NSString *)encodeBase64WithData:(NSData *)objData; | |
+ (NSData *)decodeBase64WithString:(NSString *)strBase64; | |
- (NSString*)sha1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; | |
NSArray *fontNames; | |
NSInteger indFamily, indFont; | |
for (indFamily=0; indFamily<[familyNames count]; ++indFamily) | |
{ | |
NSLog(@"Family name: %@", [familyNames objectAtIndex:indFamily]); | |
fontNames = [[NSArray alloc] initWithArray: | |
[UIFont fontNamesForFamilyName: | |
[familyNames objectAtIndex:indFamily]]]; |
OlderNewer