• Restudy on nsstring


    Restudy on nsstring Nsstring should be one of the most commonly used data types in OC development. This time, we will make a comprehensive exploration and summary of this type. Nsstring essentially belongs to OC class object, inherits from nsobject, and complies with nscopying, nsmutablecopying and nssecurecoding protocols. Nsmutablestring is similar, except that it inherits […]

  • On the cache function of IOS uiwebview for H5


    In the past two days, I have been engaged in the interaction with H5. Before that, I have been loading static web pages. The interaction debugging is very fast. This time, we are writing front-end pages written by JS. The jump is dynamic, and then it doesn’t respond. After half a day’s work, the original […]

  • Code of uitextfield in IOS to filter selected state Pinyin


    On the second day of work in 2018, I had a big pot on my back. There is a search function in our project. In this version, in order to enhance the optimization, the request of filtering space is removed, which may increase the user experience. On the contrary, stealing chicken does not erode rice. […]

  • Analysis of block closure


    Analysis of block closure In short, block is an object that encapsulates the function and its context. It can be regarded as an anonymous function in C + + or a block. Block type writing method: Return value + (^ block name) + (parameter) = ^ (parameter) {content} As follows: int (^myBlock)(int a, int b) […]

  • A brief talk about the differences between ා import, ා include and @ class in C / C + +


    1. Generally speaking, “import” is used to import the header file of objective C, and “include” is used when C / C + + header file is included. 2. Import determines that a file can only be imported once, so that you will not have problems in recursive inclusion. < mark > Therefore, the advantage […]

  • IOS development and judgment of mobile phone number and its operator


    According to the number segment of the three major operators (from Baidu Encyclopedia) Judge whether it is a mobile phone number + (BOOL)isMobile:(NSString *)str {     NSString *MOBILE = @”^1(3[0-9]|4[579]|5[0-35-9]|6[2567]|7[0-35-8]|8[0-9]|9[189])\\d{8}$”;     NSPredicate *regextestmobile = [NSPredicate predicateWithFormat:@”SELF MATCHES %@”, MOBILE];          return [regextestmobile evaluateWithObject:str]; } 2、 //Judge movement + (BOOL)isChinaMobile:(NSString *)phoneNum{ […]

  • IOS development MD5, SHA1


    MD5: + (NSString *)md5:(NSString *)input {          const char *cStr = [input UTF8String];     unsigned char digest[CC_MD5_DIGEST_LENGTH];     CC_MD5( cStr, (CC_LONG)strlen(cStr), digest );          NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];     for(int i = 0; i < CC_MD5_DIGEST_LENGTH; i++){         [output appendFormat:@”%02x”, […]

  • Explanation of syntax sugar examples in Objective-C


    Grammar sugar Syntax sugar, also translated as icing grammar, is a term invented by British computer scientist Peter J. landin. It refers to a kind of grammar added to computer language. This grammar does not affect the function of the language, but is more convenient for programmers to use. ——Wikipedia What needs to be declared […]

  • WMS service of IOS Gaode Map & mapbox map WMS service


    Web map service (WMS) Web map service (WMS) uses data with geographic location information to make maps. Map is defined as the visual representation of geographic data. It can return the corresponding map according to the user’s request (including PNG, GIF, JPEG and other grid forms, or SVG and web CGM and other vector forms). […]

  • Summary of problems encountered in the development of IOS barrage


    preface Bullet screen is now available in all kinds of videos, and it is also a function that every developer must know. Recently, we have encountered some problems in the development. Let’s briefly talk about two small problems encountered in the development of bullet screen. text Requirements: to achieve a barrage container, there will be […]

  • IOS development runtime method replacement


    Through ා importWe can find: /** * Returns a specified instance method for a given class. * * @param cls The class you want to inspect. * @param name The selector of the method you want to retrieve. * * @return The method that corresponds to the implementation of the selector specified by * \e […]

  • Summary of efficient tangent angle methods for IOS common components


    preface Round corner is a very common view effect. Compared with right angle, it is softer, more elegant and easy to accept. But many people don’t know how to set the fillet correctly. In the development of IOS client, we often meet the requirement of rounded view. In this paper, we briefly summarize some fillet […]