| 60 | } |
| 61 | |
| 62 | void CAViewController::parser() |
| 63 | { |
| 64 | m_pParser = new CAUIEditorParser(); |
| 65 | |
| 66 | std::string name = typeid(*this).name(); |
| 67 | |
| 68 | #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 |
| 69 | name = name.substr(6, name.length() - 6); |
| 70 | #else |
| 71 | |
| 72 | if (name.length() <= 10) |
| 73 | { |
| 74 | name = name.substr(1, name.length() - 1); |
| 75 | } |
| 76 | else |
| 77 | { |
| 78 | name = name.substr(2, name.length() - 2); |
| 79 | } |
| 80 | |
| 81 | #endif |
| 82 | |
| 83 | std::string filePath = "r/" + name + ".xib"; |
| 84 | |
| 85 | m_pParser->initWithPath(filePath, m_pView); |
| 86 | m_pParser->parseViewControllItems(this); |
| 87 | |
| 88 | } |
| 89 | |
| 90 | void CAViewController::viewOnEnterTransitionDidFinish() |
| 91 | { |
no test coverage detected