• How to display different colors and fonts with label in IOS


    preface In IOS, label is a control that we often encounter. We should all simply use it. Like the following code, we can simply create a label //1. Create CGRectrect =CGRectMake(100,100,100,100); UILabel* label = [[UILabelalloc]initWithFrame:rect]; introduction However, in our development, we often encounter a line of words, but display different colors and fonts. We don’t […]

  • Summary of IOS crash file analysis methods


    Method one: symbolic crash 1. Find symbolic crash Different Xcode versions of symbolicatecrash have different directories find /Applications/Xcode.app -name symbolicatecrash -type f 2. Create a crash folder mkdir crash 3. Copy crash file, symbolic crash and dsym to the same directory 4. Export Designer_ Dir environment variable export DEVELOPER_DIR=”/Applications/XCode.app/Contents/Developer” If this line is not executed, […]

  • An example of dynamic region clipping in IOS


    preface I believe everyone should have some experience. The image clipping function is used in many scenes where images are uploaded. On the one hand, the application server may have restrictions on the size of the images, so it is hoped that the uploaded images are in line with the regulations. On the other hand, […]

  • IOS tableview realizes search function


    This example for you to share the tableview search function of the specific code, for your reference, the specific content is as follows Framework: https://github.com/honeycao/HCSortAndSearchDemo There are detailed instructions in GitHub Support Chinese sorting #import “ChineseToPinyin.h” #import “HCSortString.h” #import “WLCCityTVC.h” #import “WLCProvinceModel.h” #import “ZYPinYinSearch.h” #define reusedID @”cityCell” @interface WLCCityTVC () <UITableViewDelegate, UITableViewDataSource, UISearchResultsUpdating> /** *It […]

  • IOS tableview realizes simple search function


    This example for you to share the tableview search function of the specific code, for your reference, the specific content is as follows 1、 Create a project with Xcode first Initialize view controller through Xib file 2、 Write the code 1. First, create a classification for nsdictionary to realize the deep copy of the dictionary […]

  • Solve the problem that IOS audio cannot play


    In IOS, audio can’t pass through directly audio.play () to play, the user needs to execute it in the click event or touch event audio.play () to play. Ajax callback audio.play () the music doesn’t play properly. The user clicks the button and plays the corresponding successful or failed music after the server returns the […]

  • An example of how to switch local language in IOS application


    preface When our application is only for domestic users, it generally supports only one language – Chinese. When facing foreign users, it needs to be internationalized, not only the change of language, but also the change of design style, page layout and interaction effect, such as wechat, microblog, QQ and other applications have the function […]

  • Explain the use of IOS macro and constant (define, const)


    Xiao Bian has sorted out the correct usage of macro (define) and constant (const) in IOS for you, which will help you understand this aspect more deeply. When we want to share some data globally, we can use macro, variable and constant Macro: #Define hscoder @ “Hans ha ha” Variables: Nsstring * hscoder = @ […]

  • IOS adds 3D touch function to table view


    In this paper, through examples to teach you how to add 3D touch function in table view and detailed writing, follow the test. Peek & pop is a very practical hardware related feature in iPhone, which can not only improve the operation efficiency, but also have clear visual expression. Peek & pop is a combination […]

  • Detailed explanation of the method of tool bar switching views in IOS


    In this paper, through examples to explain in detail the IOS development tool bar switch view method and principle explanation, I hope our collation is useful for you, learn together. There are several typical multi view programs in IOS (1) Tab bar application: there is a row of buttons at the bottom of the program. […]

  • Timing of controlling nslog output in IOS


    -(void)saveDEBUGlog{ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentDirectory = [paths objectAtIndex:0]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@”yyyy_MM_dd_HH_mm_ss”]; NSString *currentDateStr = [dateFormatter stringFromDate:[NSDate date]]; NSString *fileName = [NSString stringWithFormat:@”testLog_%@.log”,currentDateStr]; NSString *logFilePath = [documentDirectory stringByAppendingPathComponent:fileName]; //Delete the existing file first NSFileManager *defaultManager = [NSFileManager defaultManager]; [defaultManager removeItemAtPath:logFilePath error:nil]; //Input log to file freopen([logFilePath cStringUsingEncoding:NSASCIIStringEncoding], […]

  • How to elegantly eliminate corner mark in IOS


    preface When we improve the push function, we not only consider whether we can complete the successful remote push, but also pay attention to the user experience. The first thing we need to pay attention to is the application corner logo. Apply corner marker 1> What is application corner mark The corner marker is the […]